Merge lp:~jeremywootten/pantheon-files/fix-1471517-restore-from-trash into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 2148
Merged at revision: 2177
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1471517-restore-from-trash
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
libcore/marlin-file-utilities.c (+1/-1)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1471517-restore-from-trash
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Approve
Review via email: mp+294633@code.launchpad.net

Commit message

Sanitize original path before restoring from trash (lp:1471517)

Description of the change

This branch uses PF.FileUtils.get_file_for_path () instead of eel_g_file_get_trash_original_file (). The former deals better with weird filenames, and fixes bug.

To post a comment you must log in.
Revision history for this message
Zisu Andrei (matzipan) wrote :

I can confirm that it restores files with % in the name.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libcore/marlin-file-utilities.c'
2--- libcore/marlin-file-utilities.c 2015-07-24 11:49:02 +0000
3+++ libcore/marlin-file-utilities.c 2016-05-13 11:40:21 +0000
4@@ -77,7 +77,7 @@
5 * (it will be restored with its parent anyway) */
6 parent = g_file_get_parent(file->location);
7 if (parent != NULL && strcmp (g_file_get_basename (parent), G_DIR_SEPARATOR_S) == 0) {
8- original_file = eel_g_file_get_trash_original_file (
9+ original_file = pf_file_utils_get_file_for_path (
10 g_file_info_get_attribute_byte_string (file->info,
11 G_FILE_ATTRIBUTE_TRASH_ORIG_PATH));
12 original_dir = NULL;

Subscribers

People subscribed via source and target branches

to all changes: