From b2cb7f89c18dc129de991f2e590b110883295eac Mon Sep 17 00:00:00 2001 From: Lucky945H <1355363613@qq.com> Date: Sun, 17 May 2026 00:52:59 +0800 Subject: [PATCH] vfs/vfscache: fix silent write failure when mounting with remote:. When mounting with 'remote:.' (dot notation for current directory), the '.' is passed through toOSPath() which encodes it to full-width '.' (U+FF0E) via EncodeDot. This caused the VFS cache data/meta root to be written to a full-width-dot directory while the local cache backend pointed to the canonicalized path, resulting in writes being cached but never uploaded. Fix by calling clean() on the relativeDirPath before toOSPath(), so path.Clean() strips the trailing '/.' removing the dot before encoding. --- vfs/vfscache/cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/vfs/vfscache/cache.go b/vfs/vfscache/cache.go index a1bc6ee1f..66852e9ec 100644 --- a/vfs/vfscache/cache.go +++ b/vfs/vfscache/cache.go @@ -97,6 +97,7 @@ func New(ctx context.Context, fremote fs.Fs, opt *vfscommon.Options, avFn AddVir } } relativeDirPath = fremote.Name() + "/" + relativeDirPath + relativeDirPath = clean(relativeDirPath) relativeDirOSPath := toOSPath(relativeDirPath) // Create cache root dirs