diff --git a/vfs/vfscache/cache.go b/vfs/vfscache/cache.go index d1a1e1d36..3d1f18021 100644 --- a/vfs/vfscache/cache.go +++ b/vfs/vfscache/cache.go @@ -20,6 +20,7 @@ import ( "github.com/rclone/rclone/fs/hash" "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/fs/operations" + "github.com/rclone/rclone/lib/file" "github.com/rclone/rclone/vfs/vfscommon" ) @@ -60,9 +61,9 @@ func New(ctx context.Context, fremote fs.Fs, opt *vfscommon.Options) (*Cache, er } fRoot = strings.Replace(fRoot, ":", "", -1) } - root := filepath.Join(config.CacheDir, "vfs", fremote.Name(), fRoot) + root := file.UNCPath(filepath.Join(config.CacheDir, "vfs", fremote.Name(), fRoot)) fs.Debugf(nil, "vfs cache root is %q", root) - metaRoot := filepath.Join(config.CacheDir, "vfsMeta", fremote.Name(), fRoot) + metaRoot := file.UNCPath(filepath.Join(config.CacheDir, "vfsMeta", fremote.Name(), fRoot)) fs.Debugf(nil, "vfs metadata cache root is %q", root) fcache, err := fscache.Get(root)