mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🐛 v2.7.1-dev2未启用数据同步退出时显示同步失败 Fix https://github.com/siyuan-note/siyuan/issues/7164
This commit is contained in:
parent
07abcd0121
commit
6649220283
2 changed files with 6 additions and 9 deletions
|
|
@ -399,12 +399,14 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
||||||
WaitForWritingFiles()
|
WaitForWritingFiles()
|
||||||
|
|
||||||
if !force {
|
if !force {
|
||||||
|
if Conf.Sync.Enabled && ((IsSubscriber() && conf.ProviderSiYuan == Conf.Sync.Provider) || conf.ProviderSiYuan != Conf.Sync.Provider) {
|
||||||
syncData(false, true, false)
|
syncData(false, true, false)
|
||||||
if 0 != ExitSyncSucc {
|
if 0 != ExitSyncSucc {
|
||||||
exitCode = 1
|
exitCode = 1
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
waitSecondForExecInstallPkg := false
|
waitSecondForExecInstallPkg := false
|
||||||
if !skipNewVerInstallPkg() {
|
if !skipNewVerInstallPkg() {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ func BootSyncData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SyncData(boot, exit, byHand bool) {
|
func SyncData(boot, exit, byHand bool) {
|
||||||
util.BroadcastByType("main", "syncing", 0, Conf.Language(81), nil)
|
|
||||||
syncData(boot, exit, byHand)
|
syncData(boot, exit, byHand)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,10 +160,6 @@ func checkSync(boot, exit, byHand bool) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if !cloud.IsValidCloudDirName(Conf.Sync.CloudName) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if util.IsMutexLocked(&syncLock) {
|
if util.IsMutexLocked(&syncLock) {
|
||||||
logging.LogWarnf("sync is in progress")
|
logging.LogWarnf("sync is in progress")
|
||||||
planSyncAfter(30 * time.Second)
|
planSyncAfter(30 * time.Second)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue