summaryrefslogtreecommitdiff
path: root/src/BatchImport.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/BatchImport.vala')
-rw-r--r--src/BatchImport.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/BatchImport.vala b/src/BatchImport.vala
index 90ccba8..ae4f573 100644
--- a/src/BatchImport.vala
+++ b/src/BatchImport.vala
@@ -1508,7 +1508,13 @@ private class WorkSniffer : BackgroundImportJob {
FileToPrepare file_a = (FileToPrepare) a;
FileToPrepare file_b = (FileToPrepare) b;
string sa = file_a.get_path();
+ if (!sa.validate()) {
+ sa = Uri.escape_string(sa, Uri.RESERVED_CHARS_ALLOWED_IN_PATH, true);
+ }
string sb = file_b.get_path();
+ if (!sb.validate()) {
+ sb = Uri.escape_string(sa, Uri.RESERVED_CHARS_ALLOWED_IN_PATH, true);
+ }
return utf8_cs_compare(sa, sb);
});