mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 潜在的备份锁文件问题 https://ld246.com/article/1655253842949
This commit is contained in:
parent
120964fbba
commit
1db705b6c6
2 changed files with 4 additions and 4 deletions
|
|
@ -252,8 +252,10 @@ func CreateLocalBackup() (err error) {
|
|||
defer util.ClearPushProgress(100)
|
||||
util.PushEndlessProgress(Conf.Language(22))
|
||||
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
WaitForWritingFiles()
|
||||
|
||||
sql.WaitForWritingDatabase()
|
||||
filesys.ReleaseAllFileLocks()
|
||||
|
||||
util.LogInfof("creating backup...")
|
||||
|
|
|
|||
|
|
@ -192,14 +192,12 @@ func IndexRepo(memo string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
util.PushEndlessProgress(Conf.Language(143))
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
util.PushEndlessProgress(Conf.Language(143))
|
||||
WaitForWritingFiles()
|
||||
sql.WaitForWritingDatabase()
|
||||
filesys.ReleaseAllFileLocks()
|
||||
CloseWatchAssets()
|
||||
defer WatchAssets()
|
||||
|
||||
_, err = repo.Index(memo, util.PushEndlessProgress, indexCallbacks)
|
||||
util.PushClearProgress()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue