If a page has a URL with a trailing slash, the suggested file name was an
empty string. But we appended this empty string as file to the download
directory path, so vimb tries to save the download under a directory path an
not a file.
This patch checks the case where the filename is empty so that the default
download file name can be used.
file = util_build_path(path, vb.config.download_dir);
} else {
path = webkit_download_get_suggested_filename(download);
- if (!path) {
+ if (!path || *path == '\0') {
path = PROJECT "-donwload";
}
file = util_build_path(path, vb.config.download_dir);