From e2fc3f442cbf1d5b84b9963200ee9ceec6ba043d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 26 Jan 2023 18:01:59 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=97=B6=E5=B1=95=E5=BC=80=E6=96=87=E6=A1=A3=E6=A0=91=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/7129?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/conf.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index b27c07d53..a1389eca5 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -696,20 +696,7 @@ func clearCorruptedNotebooks() { boxDirPath := filepath.Join(util.DataDir, dir.Name()) boxConfPath := filepath.Join(boxDirPath, ".siyuan", "conf.json") if !gulu.File.IsExist(boxConfPath) { - if IsUserGuide(dir.Name()) { - filelock.Remove(boxDirPath) - continue - } - to := filepath.Join(util.WorkspaceDir, "corrupted", time.Now().Format("2006-01-02-150405"), dir.Name()) - if copyErr := filelock.Copy(boxDirPath, to); nil != copyErr { - logging.LogErrorf("copy corrupted box [%s] failed: %s", boxDirPath, copyErr) - continue - } - if removeErr := filelock.Remove(boxDirPath); nil != removeErr { - logging.LogErrorf("remove corrupted box [%s] failed: %s", boxDirPath, removeErr) - continue - } - logging.LogWarnf("moved corrupted box [%s] to [%s]", boxDirPath, to) + logging.LogWarnf("found a corrupted box [%s]", boxDirPath) continue } }