Add --local-no-unicode-normalization flag

Fixes #1411
This commit is contained in:
Bob Potter
2017-05-24 07:36:06 +01:00
committed by Nick Craig-Wood
parent a9d29c2264
commit 525220b14e
2 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -23,6 +23,7 @@ import (
var (
followSymlinks = fs.BoolP("copy-links", "L", false, "Follow symlinks and copy the pointed to item.")
noUTFNorm = fs.BoolP("local-no-unicode-normalization", "", false, "Don't apply unicode normalization to paths and filenames")
)
// Constants
@@ -325,7 +326,9 @@ func (f *Fs) cleanRemote(name string) string {
f.wmu.Unlock()
name = string([]rune(name))
}
name = norm.NFC.String(name)
if !*noUTFNorm {
name = norm.NFC.String(name)
}
name = filepath.ToSlash(name)
return name
}