From 9261f718b822a09703923fbaba7fdb754d4f57f1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Nov 2021 18:17:24 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=B4=20=EC=97=86=EB=8A=94=20=ED=8C=8C=EC=9D=BC=EC=9D=80=20?= =?UTF-8?q?=EB=B0=9B=EC=A7=80=20=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/fdfs_delete_file.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/fdfs_delete_file.c b/client/fdfs_delete_file.c index 7d9369c..186d783 100644 --- a/client/fdfs_delete_file.c +++ b/client/fdfs_delete_file.c @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) ConnectionInfo *pTrackerServer; int result; char file_id[128]; - + if (argc < 3) { printf("Usage: %s \n", argv[0]); @@ -32,7 +32,14 @@ int main(int argc, char *argv[]) log_init(); g_log_context.log_level = LOG_ERR; ignore_signal_pipe(); - + if(fdfs_client_init(conf_filename)==NULL) + { + printf("file: "__FILE__", line:%d, "\ + "open filename %s fail, " \ + "errno: %d, error info: %s\n",\ + __LINE__,filename,errno,STRERROR(errno)); + return errno !=0 ? errno : EACCES; + } conf_filename = argv[1]; if ((result=fdfs_client_init(conf_filename)) != 0) {