Merge lp:~jeremywootten/pantheon-files/fix-1641565-trash-restore-fails-with-kanji into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 2410
Merged at revision: 2450
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1641565-trash-restore-fails-with-kanji
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 13 lines (+1/-2)
1 file modified
libcore/FileUtils.vala (+1/-2)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1641565-trash-restore-fails-with-kanji
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+313835@code.launchpad.net

Commit message

Correctly validate file names with CJK characters when restoring files from the trash (lp:1641565)

Description of the change

This branch fixes a faulty validity check on files being restored, which failed if the first character of the filename was Chinese/Japanese.

To post a comment you must log in.
2410. By Jeremy Wootten

Merge trunk r2445

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libcore/FileUtils.vala'
2--- libcore/FileUtils.vala 2016-12-31 19:42:09 +0000
3+++ libcore/FileUtils.vala 2017-01-16 12:29:16 +0000
4@@ -77,9 +77,8 @@
5 unhandled_files = null;
6
7 foreach (GOF.File goffile in files) {
8- var location = goffile.location;
9 /* Check it is a valid file (e.g. not a dummy row from list view) */
10- if (!(location != null && goffile.basename.char_count (2) > 0)) {
11+ if (goffile == null || goffile.location == null) {
12 continue;
13 }
14

Subscribers

People subscribed via source and target branches

to all changes: