From 7b975bc1ff7c4f4ff900db0a2b1e2e254cdbd57a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 21 Sep 2018 10:12:57 +0100 Subject: [PATCH] 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 --- backend/alias/alias.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/alias/alias.go b/backend/alias/alias.go index 3fcf6dc14..df41019dd 100644 --- a/backend/alias/alias.go +++ b/backend/alias/alias.go @@ -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) }