From 171f7cf7777aad9b933b1393cbc229a21929363f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 16 Nov 2022 20:15:22 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=AF=BC=E5=85=A5=20`.sy.zip`=20?= =?UTF-8?q?=E5=90=8E=E4=B8=A2=E5=A4=B1=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=20Fix=20https://github.com/siyuan-note/siyuan/issues/?= =?UTF-8?q?6611?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/import.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 279d39701..e7fbc73a1 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -190,9 +190,9 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { logging.LogErrorf("unmarshal sort conf failed: %s", sortErr) } - sortPath = filepath.Join(util.DataDir, boxID, ".siyuan", "sort.json") - if gulu.File.IsExist(sortPath) { - sortData, sortErr = filelock.ReadFile(sortPath) + boxSortPath := filepath.Join(util.DataDir, boxID, ".siyuan", "sort.json") + if gulu.File.IsExist(boxSortPath) { + sortData, sortErr = filelock.ReadFile(boxSortPath) if nil != sortErr { logging.LogErrorf("read box sort conf failed: %s", sortErr) } @@ -210,11 +210,11 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { sortData, sortErr = gulu.JSON.MarshalJSON(fullSortIDs) if nil != sortErr { - logging.LogErrorf("marshal box sort conf failed: %s", sortErr) + logging.LogErrorf("marshal temp full sort conf failed: %s", sortErr) } else { sortErr = filelock.WriteFile(sortPath, sortData) if nil != sortErr { - logging.LogErrorf("write box sort conf failed: %s", sortErr) + logging.LogErrorf("write temp full sort conf failed: %s", sortErr) } } }