mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58:49 +01:00
This commit is contained in:
parent
bc7b29bd0e
commit
bd153b89c5
3 changed files with 18 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue