From 320743fb558a5cbcf62204947a2344e4c14000bf Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Mon, 23 Jun 2025 10:27:17 -0400 Subject: [PATCH] Replaced all "mkdir -p" by rou_do_mkpdir --- lib/geseml.c | 6 +----- lib/subrou.c | 3 +-- lib/uniprc.c | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/geseml.c b/lib/geseml.c index f06f3ab..7510dfa 100644 --- a/lib/geseml.c +++ b/lib/geseml.c @@ -649,11 +649,7 @@ while (proceed==true) { *(strrchr(dirname,'@'))='\000'; //keeping username only (void) strncat(dirname,"/new",sizeof(dirname)-strlen(dirname)); if ((dir=opendir(dirname))==(DIR *)0) { - int status; - char cmd[400]; - - (void) snprintf(cmd,sizeof(cmd),"mkdir -p %s",dirname); - if ((status=system(cmd))!=0) { + if (rou_do_mkpdir(dirname)==false) { (void) rou_alert(0,"%s Unable to create <%s> directory (system?/bug?)", OPEP,dirname); phase=999; //big trouble, No need to go further diff --git a/lib/subrou.c b/lib/subrou.c index 061c82f..43bdf39 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -53,8 +53,7 @@ char command[100]; (void) strcat(command,APPNAME); (void) strcat(command,"-crash"); dropzone=rou_apppath(command); -(void) snprintf(command,sizeof(command)-2,"mkdir -p %s",dropzone); -(void) system(command); +(void) rou_do_mkdir(dropzone); return dropzone; } /* diff --git a/lib/uniprc.c b/lib/uniprc.c index e7a30d3..1dbedb1 100644 --- a/lib/uniprc.c +++ b/lib/uniprc.c @@ -221,11 +221,7 @@ while (proceed==true) { fullname=rou_apppath(DIRLOCK); if ((dir=opendir(fullname))==(DIR *)0) { - int status; - char cmd[200]; - - (void) snprintf(cmd,sizeof(cmd),"mkdir -p %s",fullname); - if ((status=system(cmd))!=0) { + if (rou_do_mkpdir(fullname)=false) { (void) rou_alert(9,"Unable to create <%s> directory (system?/bug?)", fullname); phase=999; //big trouble, No need to go further -- 2.47.3