浏览代码

:art: Improve indexing completeness when exiting https://github.com/siyuan-note/siyuan/issues/12039

Daniel 11 月之前
父节点
当前提交
8646bb0b10
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      kernel/model/conf.go

+ 3 - 2
kernel/model/conf.go

@@ -610,6 +610,9 @@ func Close(force, setCurrentWorkspace bool, execInstallPkg int) (exitCode int) {
 	// Close the user guide when exiting https://github.com/siyuan-note/siyuan/issues/10322
 	closeUserGuide()
 
+	// Improve indexing completeness when exiting https://github.com/siyuan-note/siyuan/issues/12039
+	sql.WaitForWritingDatabase()
+
 	util.IsExiting.Store(true)
 	waitSecondForExecInstallPkg := false
 	if !skipNewVerInstallPkg() {
@@ -1083,8 +1086,6 @@ func closeUserGuide() {
 			logging.LogErrorf("remove corrupted user guide box [%s] failed: %s", boxDirPath, removeErr)
 		}
 
-		sql.WaitForWritingDatabase()
-
 		util.PushClearMsg(msgId)
 		logging.LogInfof("closed user guide box [%s]", boxID)
 	}