🎨 Support doc/snapshot history for database table view https://github.com/siyuan-note/siyuan/issues/9567

This commit is contained in:
Daniel
2023-11-24 00:19:44 +08:00
parent 7c4d8ec7d4
commit 59dcc2637a

View File

@@ -255,8 +255,10 @@ func RollbackDocHistory(boxID, historyPath string) (err error) {
for _, avNode := range avNodes {
srcAvPath := filepath.Join(historyDir, "storage", "av", avNode.AttributeViewID+".json")
destAvPath := filepath.Join(util.DataDir, "storage", "av", avNode.AttributeViewID+".json")
if copyErr := filelock.CopyNewtimes(srcAvPath, destAvPath); nil != copyErr {
logging.LogErrorf("copy av [%s] failed: %s", srcAvPath, copyErr)
if gulu.File.IsExist(destAvPath) {
if copyErr := filelock.CopyNewtimes(srcAvPath, destAvPath); nil != copyErr {
logging.LogErrorf("copy av [%s] failed: %s", srcAvPath, copyErr)
}
}
}
}