diff options
author | monsta <[email protected]> | 2016-02-07 14:10:57 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-02-15 17:00:57 +0300 |
commit | bb93541be09be63a002ceb0fd741faa4cc6846ec (patch) | |
tree | 426e102a8dc89dadfe206db0d092c8ffe04ad43a /libcaja-private | |
parent | d3dac519a53b2012a0072e292561b6e729b634d0 (diff) | |
download | caja-bb93541be09be63a002ceb0fd741faa4cc6846ec.tar.bz2 caja-bb93541be09be63a002ceb0fd741faa4cc6846ec.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 67b3328a..40ec0275 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -7279,17 +7279,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; |