Prechádzať zdrojové kódy

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

Daniel 2 rokov pred
rodič
commit
5a644cff73
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  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
 	}