chansrv: pathname also should be URL decoded

because 1st argument to clipboard_get_file() is given as URL encoded.
Decoding only filename is incomplete.

Without this fix, clipboard file doesn't work in case pathname
contains non-ASCII characters or non-alphanumeric ASCII characters.
master
Koichiro IWAO 8 years ago
parent b934e55fc8
commit 9f277e4445

@ -200,6 +200,7 @@ clipboard_get_file(char* file, int bytes)
}
g_memcpy(filename, file + pindex + 1, (bytes - 1) - pindex);
/* this should replace %20 with space */
clipboard_check_file(pathname);
clipboard_check_file(filename);
g_snprintf(full_fn, 255, "%s/%s", pathname, filename);
if (g_directory_exist(full_fn))

Loading…
Cancel
Save