From 97232090feb763e8b1e2c410447bd16ef4066a4c Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 20 Dec 2025 20:08:15 +0800 Subject: [PATCH] :art: Fix https://github.com/siyuan-note/siyuan/issues/16637 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/import.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/model/import.go b/kernel/model/import.go index 32f906c3e..45053ba55 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -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 }