mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +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
|
|
@ -349,7 +349,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
var sortData []byte
|
||||
var sortErr error
|
||||
sortPath := filepath.Join(unzipRootPath, ".siyuan", "sort.json")
|
||||
if gulu.File.IsExist(sortPath) {
|
||||
if filelock.IsExist(sortPath) {
|
||||
sortData, sortErr = filelock.ReadFile(sortPath)
|
||||
if nil != sortErr {
|
||||
logging.LogErrorf("read import sort conf failed: %s", sortErr)
|
||||
|
|
@ -360,7 +360,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
}
|
||||
|
||||
boxSortPath := filepath.Join(util.DataDir, boxID, ".siyuan", "sort.json")
|
||||
if gulu.File.IsExist(boxSortPath) {
|
||||
if filelock.IsExist(boxSortPath) {
|
||||
sortData, sortErr = filelock.ReadFile(boxSortPath)
|
||||
if nil != sortErr {
|
||||
logging.LogErrorf("read box sort conf failed: %s", sortErr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue