Skip to content

Commit

Permalink
fix: don't use cache if no objs
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 18, 2022
1 parent f80be96 commit 24d58f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/op/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 24d58f2

Please sign in to comment.