Skip to content

Commit

Permalink
🐛 Custom sorting not maintained after importing .sy.zip Fix #8283
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed May 17, 2023
1 parent 9ab5657 commit 4125a61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kernel/model/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,16 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {

sortData, sortErr = gulu.JSON.MarshalJSON(fullSortIDs)
if nil != sortErr {
logging.LogErrorf("marshal temp full sort conf failed: %s", sortErr)
logging.LogErrorf("marshal box full sort conf failed: %s", sortErr)
} else {
sortErr = filelock.WriteFile(sortPath, sortData)
sortErr = filelock.WriteFile(boxSortPath, sortData)
if nil != sortErr {
logging.LogErrorf("write temp full sort conf failed: %s", sortErr)
logging.LogErrorf("write box full sort conf failed: %s", sortErr)
}
}
if removeErr := os.RemoveAll(sortPath); nil != removeErr {
logging.LogErrorf("remove temp sort conf failed: %s", removeErr)
}
}

// 重命名文件路径
Expand Down

0 comments on commit 4125a61

Please sign in to comment.