diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 7ee9a10ea..2a8ecd235 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -125,6 +125,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { }) grace.OnInterrupt(func() { wfs.metaCache.Shutdown() + os.RemoveAll(option.getUniqueCacheDir()) }) wfs.root = &Dir{name: wfs.option.FilerMountRootPath, wfs: wfs, id: 1} diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index d3342a8de..11958c39e 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -99,6 +99,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { }) grace.OnInterrupt(func() { wfs.metaCache.Shutdown() + os.RemoveAll(option.getUniqueCacheDir()) }) if wfs.option.ConcurrentWriters > 0 {