Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        entrance_ipc.c 


Log Message:


make the dir if it doesnt exist!

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_ipc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- entrance_ipc.c      11 Jun 2004 03:23:47 -0000      1.9
+++ entrance_ipc.c      29 Jul 2004 08:20:55 -0000      1.10
@@ -136,6 +136,26 @@
       return FALSE;
 
    memset(buf, 0, sizeof(buf));
+     {
+       struct stat st;
+       mode_t mask;
+       char *p;
+       
+       mask = S_IRUSR | S_IWUSR | S_IXUSR;
+       strncpy(buf, PACKAGE_STATE_DIR, sizeof(buf));
+       p = buf;
+       p = strchr(p, '/');
+       while (p)
+         {
+            *p = 0;
+            if (stat(buf, &st) < 0) mkdir(buf, mask);
+            *p = '/';
+            p++;
+            p = strchr(p, '/');
+         }
+       if (stat(buf, &st) < 0) mkdir(buf, mask);
+     }
+       
    snprintf(buf, PATH_MAX, "%s_%d", PACKAGE_STATE_DIR "/" IPC_TITLE,
             server_pid);
    if (ipc_title)




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to