🎨 Upgrade kernel dpes

This commit is contained in:
Daniel 2023-10-30 17:28:19 +08:00
parent 9797e5e032
commit ca37685d08
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 9 additions and 13 deletions

View file

@ -1208,7 +1208,7 @@ func moveDoc(fromBox *Box, fromPath string, toBox *Box, toPath string, luteEngin
if gulu.File.IsExist(absToPath) {
filelock.Remove(absToPath)
}
if err = filelock.Move(absFromPath, absToPath); nil != err {
if err = filelock.Rename(absFromPath, absToPath); nil != err {
msg := fmt.Sprintf(Conf.Language(5), fromBox.Name, fromPath, err)
logging.LogErrorf("move [path=%s] in box [%s] failed: %s", fromPath, fromBox.ID, err)
err = errors.New(msg)
@ -1233,7 +1233,7 @@ func moveDoc(fromBox *Box, fromPath string, toBox *Box, toPath string, luteEngin
} else {
absFromPath := filepath.Join(util.DataDir, fromBox.ID, fromPath)
absToPath := filepath.Join(util.DataDir, toBox.ID, newPath)
if err = filelock.Move(absFromPath, absToPath); nil != err {
if err = filelock.Rename(absFromPath, absToPath); nil != err {
msg := fmt.Sprintf(Conf.Language(5), fromBox.Name, fromPath, err)
logging.LogErrorf("move [path=%s] in box [%s] failed: %s", fromPath, fromBox.ID, err)
err = errors.New(msg)