From 4bb39d90fee689896a8e96bd2ffa8725f996d6c1 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 23 Mar 2023 19:32:11 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=B9=E8=BF=9B=E5=86=99=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E8=B7=AF=E5=BE=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/util/working.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/util/working.go b/kernel/util/working.go index e7c0656dc..691b7a806 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -35,6 +35,7 @@ import ( "github.com/88250/gulu" figure "github.com/common-nighthawk/go-figure" "github.com/gofrs/flock" + "github.com/siyuan-note/filelock" "github.com/siyuan-note/httpclient" "github.com/siyuan-note/logging" ) @@ -295,7 +296,7 @@ func WriteWorkspacePaths(workspacePaths []string) (err error) { return } - if err = os.WriteFile(workspaceConf, data, 0644); nil != err { + if err = filelock.WriteFile(workspaceConf, data); nil != err { msg := fmt.Sprintf("write workspace conf [%s] failed: %s", workspaceConf, err) logging.LogErrorf(msg) err = errors.New(msg)