Fixed wrongs check of g_mkdir_with_parents #381.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 26 Apr 2017 20:13:36 +0000 (22:13 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 26 Apr 2017 20:15:17 +0000 (22:15 +0200)
src/util.c

index 8f1c2b4..b19aeaa 100644 (file)
@@ -101,7 +101,7 @@ void util_cleanup(void)
 
 gboolean util_create_dir_if_not_exists(const char *dirpath)
 {
-    if (!g_mkdir_with_parents(dirpath, 0755)) {
+    if (g_mkdir_with_parents(dirpath, 0755) == -1) {
         g_critical("Could not create directory '%s': %s", dirpath, strerror(errno));
 
         return FALSE;