mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-18 14:35:27 +01:00
🎨 云端同步冲突时支持设置是否产生冲突文档 https://github.com/siyuan-note/siyuan/issues/6110
This commit is contained in:
parent
6e7e154a3c
commit
698f773ee2
9 changed files with 43 additions and 9 deletions
|
|
@ -541,7 +541,7 @@ func syncRepo(boot, exit, byHand bool) (err error) {
|
|||
|
||||
logSyncMergeResult(mergeResult)
|
||||
|
||||
if 0 < len(mergeResult.Conflicts) {
|
||||
if 0 < len(mergeResult.Conflicts) && Conf.Sync.GenerateConflictDoc {
|
||||
// 云端同步发生冲突时生成副本 https://github.com/siyuan-note/siyuan/issues/5687
|
||||
|
||||
luteEngine := NewLute()
|
||||
|
|
|
|||
|
|
@ -216,6 +216,15 @@ func SetCloudSyncDir(name string) {
|
|||
Conf.Save()
|
||||
}
|
||||
|
||||
func SetSyncGenerateConflictDoc(b bool) {
|
||||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
|
||||
Conf.Sync.GenerateConflictDoc = b
|
||||
Conf.Save()
|
||||
return
|
||||
}
|
||||
|
||||
func SetSyncEnable(b bool) (err error) {
|
||||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue