Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-20 20:08:15 +08:00
parent a038421e73
commit 97232090fe
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -262,6 +262,14 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
if d == nil {
return nil
}
if ".json" == d.Name() { // https://github.com/siyuan-note/siyuan/issues/16637
if removeErr := os.RemoveAll(path); nil != removeErr {
logging.LogErrorf("remove empty av file [%s] failed: %s", path, removeErr)
}
return nil
}
if !strings.HasSuffix(path, ".json") || !ast.IsNodeIDPattern(strings.TrimSuffix(d.Name(), ".json")) {
return nil
}