mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 不再自动从临时文件中恢复数据文件 Fix https://github.com/siyuan-note/siyuan/issues/7260
This commit is contained in:
parent
e7f2fb9c9c
commit
ae9ba8496f
3 changed files with 5 additions and 86 deletions
|
|
@ -245,7 +245,10 @@ func (box *Box) Ls(p string) (ret []*FileInfo, totals int, err error) {
|
|||
}
|
||||
if strings.HasSuffix(name, ".tmp") {
|
||||
// 移除写入失败时产生的临时文件
|
||||
os.Remove(filepath.Join(util.DataDir, box.ID, p, name))
|
||||
removePath := filepath.Join(util.DataDir, box.ID, p, name)
|
||||
if removeErr := os.Remove(removePath); nil != removeErr {
|
||||
logging.LogWarnf("remove tmp file [%s] failed: %s", removePath, removeErr)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue