From 89e20d9631a4ca7352377bd37b4557116160326f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 21 Mar 2023 18:55:08 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=B9=E8=BF=9B=E5=AF=BC=E5=85=A5=20?= =?UTF-8?q?data.zip=20=E5=92=8C=20.sy.zip=20=E6=A0=A1=E9=AA=8C=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=97=B6=E7=9A=84=E6=8F=90=E7=A4=BA=20Fix=20https://g?= =?UTF-8?q?ithub.com/siyuan-note/siyuan/issues/7738?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/import.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/model/import.go b/kernel/model/import.go index 4fa1f52a2..1bd8d6c96 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -115,6 +115,11 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { return errors.New(Conf.Language(199)) } unzipRootPath := unzipRootPaths[0] + name := filepath.Base(unzipRootPath) + if strings.HasPrefix(name, "data-20") && len("data-20230321175442") == len(name) { + return errors.New(Conf.Language(199)) + } + luteEngine := util.NewLute() blockIDs := map[string]string{} trees := map[string]*parse.Tree{}