From 2d2ef40a7c5dcad18c5b9f59ffd692e7e068c910 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 16 Feb 2026 12:09:50 +0800 Subject: [PATCH] :art: Improve importing .sy.zip https://github.com/siyuan-note/siyuan/issues/17047#issuecomment-3906289100 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 070f9a4fd..18eaa0054 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -581,7 +581,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { if err != nil { return err } - if d == nil { + if d == nil || unzipRootPath == path { return nil } if d.Name() == "assets" && d.IsDir() { @@ -627,7 +627,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { if err != nil { return err } - if d == nil { + if d == nil || unzipRootPath == path { return nil } if d.Name() == "emojis" && d.IsDir() {