aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 3b2a9ef..d6fa595 100644
--- a/src/main.c
+++ b/src/main.c
@@ -78,7 +78,11 @@ blogc_mkdir_recursive(const char *filename)
char bkp = *tmp;
*tmp = '\0';
if ((strlen(fname) > 0) &&
+#if defined(WIN32) || defined(_WIN32)
+ (-1 == mkdir(fname)) &&
+#else
(-1 == mkdir(fname, 0777)) &&
+#endif
(errno != EEXIST))
{
fprintf(stderr, "blogc: error: failed to create output "