From 298f9389d8543c080db18969b629f4be958899b9 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Sat, 5 Apr 2014 21:45:43 -0700 Subject: [PATCH] mkdir and unlink are permitted exactly one error fixes #131 --- v/unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v/unix.c b/v/unix.c index 4a79cf1f3..9415462f3 100644 --- a/v/unix.c +++ b/v/unix.c @@ -58,7 +58,7 @@ _unix_opendir(c3_c* pax_c) static void _unix_mkdir(c3_c* pax_c) { - if ( 0 != mkdir(pax_c, 0755) ) { + if ( 0 != mkdir(pax_c, 0755) && EEXIST != errno) { uL(fprintf(uH, "%s: %s\n", pax_c, strerror(errno))); c3_assert(0); } @@ -69,7 +69,7 @@ _unix_mkdir(c3_c* pax_c) static void _unix_unlink(c3_c* pax_c) { - if ( 0 != unlink(pax_c) ) { + if ( 0 != unlink(pax_c) && ENOENT != errno) { uL(fprintf(uH, "%s: %s\n", pax_c, strerror(errno))); c3_assert(0); }