diff options
author | monsta <[email protected]> | 2016-02-07 14:10:57 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-02-07 14:10:57 +0300 |
commit | b2737bb68c81e4095aa14c94fc93eb2acdd00ce0 (patch) | |
tree | 8bc67084d1994c7634fc933c260345714153153c /libcaja-private | |
parent | af1603f8f8dd3c575fdd87284cfe711d1d7ef75f (diff) | |
download | caja-b2737bb68c81e4095aa14c94fc93eb2acdd00ce0.tar.bz2 caja-b2737bb68c81e4095aa14c94fc93eb2acdd00ce0.tar.xz |
fix crash when restoring file with special characters from trash
for example, a file named simply "%s"
taken from:
https://git.gnome.org/browse/nautilus/commit/?id=d69885bd67edc1fae76c790f6162807817d63b2f
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-file.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index 51ba1978..9d915244 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -7278,17 +7278,13 @@ caja_file_get_trash_original_file (CajaFile *file) { GFile *location; CajaFile *original_file; - char *filename; original_file = NULL; if (file->details->trash_orig_path != NULL) { - /* file name is stored in URL encoding */ - filename = g_uri_unescape_string (file->details->trash_orig_path, ""); - location = g_file_new_for_path (filename); + location = g_file_new_for_path (file->details->trash_orig_path); original_file = caja_file_get (location); - g_object_unref (G_OBJECT (location)); - g_free (filename); + g_object_unref (location); } return original_file; |