mirror of
https://github.com/rclone/rclone.git
synced 2025-12-30 15:13:55 +00:00
vfs: Only make the VFS cache if --vfs-cache-mode > Off
This stops the cache cleaner running unnecessarily and saves resources. This also helps with issue #2227 which was caused by a second mount deleting objects in the first mounts cache.
This commit is contained in:
@@ -215,7 +215,7 @@ func (r *Run) cacheMode(cacheMode vfs.CacheMode) {
|
||||
log.Printf("Failed to cleanup the VFS cache: %v", err)
|
||||
}
|
||||
// Reset the cache mode
|
||||
r.vfs.Opt.CacheMode = cacheMode
|
||||
r.vfs.SetCacheMode(cacheMode)
|
||||
// Flush the directory cache
|
||||
r.vfs.FlushDirCache()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user