From 84421a7c689e3842a97c9aba30015736b0a0e46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96rn?= Date: Wed, 5 Oct 2016 07:30:46 +0200 Subject: [PATCH] structured file with gofmt --- src/restic/fs/file.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/restic/fs/file.go b/src/restic/fs/file.go index b11dfb48c..a2e6822f6 100644 --- a/src/restic/fs/file.go +++ b/src/restic/fs/file.go @@ -28,11 +28,17 @@ func fixpath(name string) string { abspath, err := filepath.Abs(name) if err == nil { // Check if \\?\UNC\ already exist - if strings.HasPrefix(abspath, "\\\\?\\UNC\\") { return abspath } + if strings.HasPrefix(abspath, "\\\\?\\UNC\\") { + return abspath + } // Check if \\?\ already exist - if strings.HasPrefix(abspath, "\\\\?\\") { return abspath } + if strings.HasPrefix(abspath, "\\\\?\\") { + return abspath + } // Check if path starts with \\ - if strings.HasPrefix(abspath, "\\\\") { return strings.Replace(abspath, "\\\\", "\\\\?\\UNC\\", 1) } + if strings.HasPrefix(abspath, "\\\\") { + return strings.Replace(abspath, "\\\\", "\\\\?\\UNC\\", 1) + } // Normal path return "\\\\?\\" + abspath }