summaryrefslogtreecommitdiff
path: root/types.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-11-15 16:19:23 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-11-15 16:19:23 -0500
commit29c005aded55168631029f9b129ff812ff96f802 (patch)
tree466eed0750d8976110e62e947c6ef6102dd450bb /types.go
parent902bb1cc2a0a8644e160f303be1a2e0ad354bfd5 (diff)
more
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