mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🐛 Notebook data may be corrupted during data synchronization https://github.com/siyuan-note/siyuan/issues/9594
This commit is contained in:
parent
a721bbe6f0
commit
70c56c8e25
24 changed files with 88 additions and 96 deletions
|
|
@ -18,7 +18,6 @@ package api
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
|
|
@ -153,12 +152,12 @@ func getFileAnnotation(c *gin.Context) {
|
|||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
if !gulu.File.IsExist(readPath) {
|
||||
if !filelock.IsExist(readPath) {
|
||||
ret.Code = 1
|
||||
return
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(readPath)
|
||||
data, err := filelock.ReadFile(readPath)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue