From 2a913e7a6cc1d60d9be9be59babc36869dac4afd Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Thu, 3 Jul 2025 16:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/internal/mount/vfs/cache/cache.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/internal/mount/vfs/cache/cache.go b/client/internal/mount/vfs/cache/cache.go index 593d1d9..6de131a 100644 --- a/client/internal/mount/vfs/cache/cache.go +++ b/client/internal/mount/vfs/cache/cache.go @@ -799,6 +799,11 @@ func (c *Cache) scanningData() { continue } + // 按Readdir函数的说法,不会存在len(e) == 0且err == nil的情况,但实际发生了 + if len(e) == 0 { + continue + } + if e[0].IsDir() { child, err := os.Open(filepath.Join(lastNode.Name(), e[0].Name())) if err != nil {