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

This commit is contained in:
Daniel 2024-06-20 19:45:02 +08:00
parent 1bae4a16ac
commit 1cbc4c6306
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

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