浏览代码

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

Liang Ding 3 年之前
父节点
当前提交
914712612d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      kernel/model/assets.go

+ 2 - 2
kernel/model/assets.go

@@ -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 {