src/prpl.c

changeset 4802
6247080d3af6
parent 4799
9b612e91f725
child 4889
9c81754db28e
--- a/src/prpl.c	Sun Mar 16 20:41:19 2003 +0000
+++ b/src/prpl.c	Sun Mar 16 22:34:43 2003 +0000
@@ -26,6 +26,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
+#include <errno.h>
 
 #ifdef _WIN32
 #include "win32dep.h"
@@ -618,8 +619,12 @@
 
 		g_free(random);
 
-		if(!g_file_test(dirname, G_FILE_TEST_IS_DIR))
-			mkdir(dirname, S_IRUSR | S_IWUSR | S_IXUSR);
+		if(!g_file_test(dirname, G_FILE_TEST_IS_DIR)) {
+			debug_printf("creating icon cache directory\n");
+			if(mkdir(dirname, S_IRUSR | S_IWUSR | S_IXUSR) < 0)
+				debug_printf("error creating directory %s: %s\n",
+						dirname, strerror(errno));
+		}
 
 		g_free(dirname);
 

mercurial