mirror of
https://github.com/octoleo/restic.git
synced 2025-02-02 11:58:26 +00:00
structured file with gofmt
This commit is contained in:
parent
5c7325f44a
commit
84421a7c68
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user