]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Replaced all "mkdir -p" by rou_do_mkpdir
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 23 Jun 2025 14:27:17 +0000 (10:27 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 23 Jun 2025 14:27:17 +0000 (10:27 -0400)
lib/geseml.c
lib/subrou.c
lib/uniprc.c

index f06f3ab9839338b52dcf3a44111b6f503d97efad..7510dfacb2f6d6eb8eb689781d1425fc0044af93 100644 (file)
@@ -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
index 061c82f9bb67bffc0dc0a69a4512d8a26231cabe..43bdf39b28b7243a83ca6d37bff3ac1731694658 100644 (file)
@@ -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;
 }
 /*
index e7a30d30944ed995b80db3ed647e16589608c295..1dbedb1434d7f604c5a0cd5402e4806c522dbad8 100644 (file)
@@ -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