From 29c005aded55168631029f9b129ff812ff96f802 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 15 Nov 2017 16:19:23 -0500 Subject: more --- types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'types.go') 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 -- cgit v1.2.3