Parcourir la source

:art: Ignore hidden files when generating asset history https://github.com/siyuan-note/siyuan/issues/11253

Daniel il y a 1 an
Parent
commit
1cbc4c6306
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      kernel/model/assets.go

+ 4 - 0
kernel/model/assets.go

@@ -688,6 +688,10 @@ func RemoveUnusedAssets() (ret []string) {
 	for _, p := range unusedAssets {
 		historyPath := filepath.Join(historyDir, p)
 		if p = filepath.Join(util.DataDir, p); filelock.IsExist(p) {
+			if filelock.IsHidden(p) {
+				continue
+			}
+
 			if err = filelock.Copy(p, historyPath); nil != err {
 				return
 			}