Explorar o código

:art: Flashcards are not allowed to be modified during data sync to avoid data overwriting https://github.com/siyuan-note/siyuan/issues/10167

Daniel hai 1 ano
pai
achega
43c6fabcdc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      kernel/model/flashcard.go

+ 2 - 2
kernel/model/flashcard.go

@@ -641,7 +641,7 @@ func (tx *Transaction) doRemoveFlashcards(operation *Operation) (ret *TxErr) {
 	deckLock.Lock()
 	deckLock.Lock()
 	defer deckLock.Unlock()
 	defer deckLock.Unlock()
 
 
-	if syncingStorages.Load() {
+	if isSyncing.Load() {
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		return
 		return
 	}
 	}
@@ -753,7 +753,7 @@ func (tx *Transaction) doAddFlashcards(operation *Operation) (ret *TxErr) {
 	deckLock.Lock()
 	deckLock.Lock()
 	defer deckLock.Unlock()
 	defer deckLock.Unlock()
 
 
-	if syncingStorages.Load() {
+	if isSyncing.Load() {
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		ret = &TxErr{code: TxErrCodeDataIsSyncing}
 		return
 		return
 	}
 	}