summaryrefslogtreecommitdiff
path: root/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'types.go')
-rw-r--r--types.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.go b/types.go
index d5c3f7a..1ce0741 100644
--- a/types.go
+++ b/types.go
@@ -43,7 +43,7 @@ func (m Mode) String() string {
}
func PathEscape(path string) string {
- if strings.HasPrefix(path, "\"") || strings.ContainsRune("\n") {
+ if strings.HasPrefix(path, "\"") || strings.ContainsRune(path, '\n') {
return "\"" + strings.Replace(strings.Replace(strings.Replace(path, "\\", "\\\\", -1), "\"", "\\\"", -1), "\n", "\\n", -1) + "\""
} else {
return path