🎨 识别未引用资源时考虑 PDF 标注引用 https://github.com/siyuan-note/siyuan/issues/5392

This commit is contained in:
Liang Ding 2022-07-11 12:13:10 +08:00
parent 14b7fb9511
commit 914712612d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -516,11 +516,11 @@ func UnusedAssets() (ret []string) {
}
}
// 排除文件注解
// 排除文件注解和对应文件
var toRemoves []string
for asset, _ := range assetsPathMap {
if strings.HasSuffix(asset, ".sya") {
toRemoves = append(toRemoves, asset)
toRemoves = append(toRemoves, asset, strings.TrimSuffix(asset, ".sya"))
}
}
for _, toRemove := range toRemoves {