瀏覽代碼

:art: Add kernel API `/api/file/renameFile` https://github.com/siyuan-note/siyuan/issues/8328

Daniel 2 年之前
父節點
當前提交
5a644cff73
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      kernel/api/file.go

+ 2 - 0
kernel/api/file.go

@@ -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
 	}