diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-15 16:19:23 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-15 16:19:23 -0500 |
commit | 29c005aded55168631029f9b129ff812ff96f802 (patch) | |
tree | 466eed0750d8976110e62e947c6ef6102dd450bb /types.go | |
parent | 902bb1cc2a0a8644e160f303be1a2e0ad354bfd5 (diff) |
more
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |