mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🐛 An issue that caused cloud data corruption https://github.com/siyuan-note/siyuan/issues/9846
This commit is contained in:
parent
150336dcf5
commit
94077b908b
5 changed files with 14 additions and 50 deletions
|
|
@ -114,22 +114,6 @@ func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *p
|
|||
return
|
||||
}
|
||||
|
||||
func WriteTreeWithoutChangeTime(tree *parse.Tree) (err error) {
|
||||
data, filePath, err := prepareWriteTree(tree)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
if err = filelock.WriteFileWithoutChangeTime(filePath, data); nil != err {
|
||||
msg := fmt.Sprintf("write data [%s] failed: %s", filePath, err)
|
||||
logging.LogErrorf(msg)
|
||||
return errors.New(msg)
|
||||
}
|
||||
|
||||
afterWriteTree(tree)
|
||||
return
|
||||
}
|
||||
|
||||
func WriteTree(tree *parse.Tree) (err error) {
|
||||
data, filePath, err := prepareWriteTree(tree)
|
||||
if nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue