From b7beab267dfd0733e5f567ffe06e0f6cf2df9acf Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 1 Jul 2022 23:08:56 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=BD=93=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E6=97=B6=E6=94=AF=E6=8C=81=E5=9C=A8=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=8A/=E4=B8=8B=E6=96=B0=E5=BB=BA=E5=90=8C?= =?UTF-8?q?=E7=BA=A7=E6=96=87=E6=A1=A3=20https://github.com/siyuan-note/si?= =?UTF-8?q?yuan/issues/5098?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/file.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/model/file.go b/kernel/model/file.go index c89ed3b75..7a1f7b6ac 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -1483,6 +1483,10 @@ func rootChildIDs(rootID string) (ret []string) { } func ChangeFileTreeSort(boxID string, paths []string) { + if 1 > len(paths) { + return + } + WaitForWritingFiles() writingDataLock.Lock() defer writingDataLock.Unlock()