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:
Nick Craig-Wood 2018-09-21 10:12:57 +01:00
parent 467fe30a5e
commit 7b975bc1ff

View File

@ -51,9 +51,10 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
if err != nil {
return nil, err
}
root = path.Join(fsPath, filepath.ToSlash(root))
if configName == "local" {
root = filepath.Join(fsPath, root)
return fs.NewFs(root)
}
root = path.Join(fsPath, filepath.ToSlash(root))
return fs.NewFs(configName + ":" + root)
}