Commit d69885bd authored by Cosimo Cecchi's avatar Cosimo Cecchi

file: don't crash when the original file path has reserved characters

We shouldn't even try to unescape this, as GIO returns a valid path.

https://bugzilla.gnome.org/show_bug.cgi?id=692737
parent b632e32b
......@@ -7044,17 +7044,13 @@ nautilus_file_get_trash_original_file (NautilusFile *file)
{
GFile *location;
NautilusFile *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 = nautilus_file_get (location);
g_object_unref (G_OBJECT (location));
g_free (filename);
g_object_unref (location);
}
return original_file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment