mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 02:09:55 +08:00
alias: Fix handling of Windows network paths
Before this fix, the alias backend would mangle Windows paths like //server/drive as it was treating them as unix paths. See https://forum.rclone.org/t/smb-share-alias/6857
This commit is contained in:
parent
467fe30a5e
commit
7b975bc1ff
|
@ -51,9 +51,10 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
root = path.Join(fsPath, filepath.ToSlash(root))
|
|
||||||
if configName == "local" {
|
if configName == "local" {
|
||||||
|
root = filepath.Join(fsPath, root)
|
||||||
return fs.NewFs(root)
|
return fs.NewFs(root)
|
||||||
}
|
}
|
||||||
|
root = path.Join(fsPath, filepath.ToSlash(root))
|
||||||
return fs.NewFs(configName + ":" + root)
|
return fs.NewFs(configName + ":" + root)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user