mirror of
https://github.com/octoleo/restic.git
synced 2024-11-04 20:37:49 +00:00
using backtics instead of doublequotes
This commit is contained in:
parent
84421a7c68
commit
ba8d960c8f
@ -28,19 +28,19 @@ func fixpath(name string) string {
|
|||||||
abspath, err := filepath.Abs(name)
|
abspath, err := filepath.Abs(name)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Check if \\?\UNC\ already exist
|
// Check if \\?\UNC\ already exist
|
||||||
if strings.HasPrefix(abspath, "\\\\?\\UNC\\") {
|
if strings.HasPrefix(abspath, `\\?\UNC\`) {
|
||||||
return abspath
|
return abspath
|
||||||
}
|
}
|
||||||
// Check if \\?\ already exist
|
// Check if \\?\ already exist
|
||||||
if strings.HasPrefix(abspath, "\\\\?\\") {
|
if strings.HasPrefix(abspath, `\\?\`) {
|
||||||
return abspath
|
return abspath
|
||||||
}
|
}
|
||||||
// Check if path starts with \\
|
// Check if path starts with \\
|
||||||
if strings.HasPrefix(abspath, "\\\\") {
|
if strings.HasPrefix(abspath, `\\`) {
|
||||||
return strings.Replace(abspath, "\\\\", "\\\\?\\UNC\\", 1)
|
return strings.Replace(abspath, `\\`, `\\?\UNC\`, 1)
|
||||||
}
|
}
|
||||||
// Normal path
|
// Normal path
|
||||||
return "\\\\?\\" + abspath
|
return `\\?\` + abspath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name
|
return name
|
||||||
|
Loading…
Reference in New Issue
Block a user