This commit is contained in:
Daniel 2024-11-10 11:32:17 +08:00
parent 77f96529e4
commit 01415b4821
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -525,7 +525,12 @@ func RemoveUnusedAssets() (ret []string) {
if filelock.IsExist(absPath) {
info, statErr := os.Stat(absPath)
if statErr == nil {
size += info.Size()
if info.IsDir() {
dirSize, _ := util.SizeOfDirectory(absPath)
size += dirSize
} else {
size += info.Size()
}
}
if err := filelock.Remove(absPath); err != nil {