about summary refs log tree commit diff stats
path: root/src/profanity.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-08-04 17:20:46 +0100
committerJames Booth <boothj5@gmail.com>2013-08-04 17:20:46 +0100
commit3588a9d7761669f6d1c6776a07cc0555afd4b084 (patch)
tree7a1d204a8d2fcc4f3b0ac7f5278b978446c54ad5 /src/profanity.c
parent87c627710906171b3696e65fac985bd50c43c6f3 (diff)
parent20dff5fe2f0251d39a1667b547a49cef3b115899 (diff)
downloadprofani-tty-3588a9d7761669f6d1c6776a07cc0555afd4b084.tar.gz
Merge remote-tracking branch 'dmitry/nextdev-patches' into nextdev
Diffstat (limited to 'src/profanity.c')
-rw-r--r--src/profanity.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/profanity.c b/src/profanity.c
index 9c729ca1..4e9e887c 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -664,9 +664,15 @@ _create_directories(void)
     GString *logs_dir = g_string_new(xdg_data);
     g_string_append(logs_dir, "/profanity/logs");
 
-    mkdir_recursive(themes_dir->str);
-    mkdir_recursive(chatlogs_dir->str);
-    mkdir_recursive(logs_dir->str);
+    if (!mkdir_recursive(themes_dir->str)) {
+        log_error("Error while creating directory %s", themes_dir->str);
+    }
+    if (!mkdir_recursive(chatlogs_dir->str)) {
+        log_error("Error while creating directory %s", chatlogs_dir->str);
+    }
+    if (!mkdir_recursive(logs_dir->str)) {
+        log_error("Error while creating directory %s", logs_dir->str);
+    }
 
     g_string_free(themes_dir, TRUE);
     g_string_free(chatlogs_dir, TRUE);