mirror of
https://github.com/rclone/rclone.git
synced 2026-01-04 01:23:24 +00:00
cache: add SIGHUP support to evict all cache - fixes 1906
This commit is contained in:
5
cache/storage_persistent.go
vendored
5
cache/storage_persistent.go
vendored
@@ -272,11 +272,12 @@ func (b *Persistent) RemoveDir(fp string) error {
|
||||
|
||||
// delete chunks on disk
|
||||
// safe to ignore as the files might not have been open
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
_ = os.RemoveAll(path.Join(b.dataPath, fp))
|
||||
_ = os.MkdirAll(b.dataPath, os.ModePerm)
|
||||
}
|
||||
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
// ExpireDir will flush a CachedDirectory and all its objects from the objects
|
||||
|
||||
Reference in New Issue
Block a user