mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-04 20:54:44 -06:00
Convert samba drive paths to UNC paths
This commit is contained in:
@@ -282,6 +282,10 @@ func joinPath(components ...string) string {
|
|||||||
combinedPath := path.Join(components...)
|
combinedPath := path.Join(components...)
|
||||||
if len(combinedPath) > 257 && runtime.GOOS == "windows" {
|
if len(combinedPath) > 257 && runtime.GOOS == "windows" {
|
||||||
combinedPath = `\\?\` + filepath.Join(components...)
|
combinedPath = `\\?\` + filepath.Join(components...)
|
||||||
|
// If the path is on a samba drive we must use the UNC format
|
||||||
|
if strings.HasPrefix(combinedPath, `\\?\\\`) {
|
||||||
|
combinedPath = `\\?\UNC\` + combinedPath[6:]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return combinedPath
|
return combinedPath
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user