mkdir and unlink are permitted exactly one error

fixes #131
This commit is contained in:
~hatteb-mitlyd 2014-04-05 21:45:43 -07:00
parent 94dd54fc67
commit 298f9389d8

View File

@ -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);
}