mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🎨 改进已经损坏的数据处理 Fix https://github.com/siyuan-note/siyuan/issues/5853
This commit is contained in:
parent
38c70f13a4
commit
8f3dd9fbf4
2 changed files with 25 additions and 9 deletions
|
|
@ -92,8 +92,8 @@ func ListNotebooks() (ret []*Box, err error) {
|
|||
continue
|
||||
}
|
||||
to := filepath.Join(util.WorkspaceDir, "corrupted", time.Now().Format("2006-01-02-150405"), dir.Name())
|
||||
if renameErr := gulu.File.CopyDir(boxDirPath, to); nil != renameErr {
|
||||
logging.LogErrorf("copy corrupted box [%s] failed: %s", boxDirPath, renameErr)
|
||||
if copyErr := gulu.File.CopyDir(boxDirPath, to); nil != copyErr {
|
||||
logging.LogErrorf("copy corrupted box [%s] failed: %s", boxDirPath, copyErr)
|
||||
continue
|
||||
}
|
||||
if removeErr := os.RemoveAll(boxDirPath); nil != removeErr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue