mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 04:48:48 +01:00
🎨 Add kernel API /api/file/renameFile https://github.com/siyuan-note/siyuan/issues/8328
This commit is contained in:
parent
e4229f2bad
commit
5a644cff73
1 changed files with 2 additions and 0 deletions
|
|
@ -196,6 +196,7 @@ func renameFile(c *gin.Context) {
|
|||
}
|
||||
|
||||
if err = filelock.Rename(filePath, newPath); nil != err {
|
||||
logging.LogErrorf("rename file [%s] to [%s] failed: %s", filePath, newPath, err)
|
||||
c.Status(500)
|
||||
return
|
||||
}
|
||||
|
|
@ -225,6 +226,7 @@ func removeFile(c *gin.Context) {
|
|||
}
|
||||
|
||||
if err = filelock.Remove(filePath); nil != err {
|
||||
logging.LogErrorf("remove [%s] failed: %s", filePath, err)
|
||||
c.Status(500)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue