Browse Source

clean up cache on exit

pull/2673/head
chrislu 3 years ago
parent
commit
37e8fce841
  1. 1
      weed/filesys/wfs.go
  2. 1
      weed/mount/weedfs.go

1
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}

1
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 {

Loading…
Cancel
Save