From 24d58f278ad6bb5eae05b126d95003dee822b2c2 Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Sun, 18 Sep 2022 18:38:47 +0800 Subject: [PATCH] fix: don't use cache if no objs --- internal/op/fs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/op/fs.go b/internal/op/fs.go index 564b5eaefb9..edf408db4d8 100644 --- a/internal/op/fs.go +++ b/internal/op/fs.go @@ -52,7 +52,7 @@ func List(ctx context.Context, storage driver.Driver, path string, args model.Li } key := Key(storage, path) if len(refresh) == 0 || !refresh[0] { - if files, ok := listCache.Get(key); ok { + if files, ok := listCache.Get(key); ok && len(files) > 0 { return files, nil } }