This commit is contained in:
Liang Ding 2023-01-31 20:24:44 +08:00
parent bc7b29bd0e
commit bd153b89c5
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 18 additions and 11 deletions

View file

@ -419,7 +419,7 @@ func RemoveUnusedAssets() (ret []string) {
}
}
sql.DeleteAssetsByHashes(hashes)
sql.BatchRemoveAssetsQueue(hashes)
for _, unusedAsset := range unusedAssets {
if unusedAsset = filepath.Join(util.DataDir, unusedAsset); gulu.File.IsExist(unusedAsset) {
@ -458,7 +458,7 @@ func RemoveUnusedAsset(p string) (ret string) {
}
hash, _ := util.GetEtag(absPath)
sql.DeleteAssetsByHashes([]string{hash})
sql.BatchRemoveAssetsQueue([]string{hash})
}
if err = os.RemoveAll(absPath); nil != err {