mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
🎨 Files rolled back from file history are no longer overwritten by data sync Fix https://github.com/siyuan-note/siyuan/issues/8014
This commit is contained in:
parent
1cc838950a
commit
6c131e4d52
3 changed files with 12 additions and 12 deletions
|
|
@ -235,7 +235,7 @@ func RollbackDocHistory(boxID, historyPath string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
if err = filelock.Copy(srcPath, destPath); nil != err {
|
||||
if err = filelock.CopyNewtimes(srcPath, destPath); nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ func RollbackAssetsHistory(historyPath string) (err error) {
|
|||
from := historyPath
|
||||
to := filepath.Join(util.DataDir, "assets", filepath.Base(historyPath))
|
||||
|
||||
if err = filelock.Copy(from, to); nil != err {
|
||||
if err = filelock.CopyNewtimes(from, to); nil != err {
|
||||
logging.LogErrorf("copy file [%s] to [%s] failed: %s", from, to, err)
|
||||
return
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ func RollbackNotebookHistory(historyPath string) (err error) {
|
|||
from := historyPath
|
||||
to := filepath.Join(util.DataDir, filepath.Base(historyPath))
|
||||
|
||||
if err = filelock.Copy(from, to); nil != err {
|
||||
if err = filelock.CopyNewtimes(from, to); nil != err {
|
||||
logging.LogErrorf("copy file [%s] to [%s] failed: %s", from, to, err)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue