mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-19 16:14:39 +00:00
fix (caching): fix docker overlayfs issue
for some reasons unlink is not enough using docker which never release the unlinked files back to the os making df -h reporting different things than du -hsx /
This commit is contained in:
@@ -33,6 +33,7 @@ func init() {
|
||||
fileCache = NewAppCache()
|
||||
fileCache.OnEvict(func(key string, value interface{}) {
|
||||
if tmpPath, _, ok := strings.Cut(value.(string), "::"); ok {
|
||||
os.Truncate(tmpPath, 0)
|
||||
os.RemoveAll(tmpPath)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user