Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vfs: fix inefficient directory caching when directory reads are slow

huanghaojun49f6ed5f5e41
diff --git a/vfs/dir.go b/vfs/dir.go
index 12d9591a0..174b7d001 100644
--- a/vfs/dir.go
+++ b/vfs/dir.go
@@ -581,7 +581,7 @@ func (d *Dir) _readDir() error {
return err
}
- d.read = when
+ d.read = time.Now()
d.cleanupTimer.Reset(time.Duration(d.vfs.Opt.DirCacheTime * 2))
return nil