sync palliative: don't assert, recreate

This commit is contained in:
~hatteb-mitlyd 2014-05-13 16:32:44 -07:00
parent 4daa9a6ed9
commit a1055f57cb

View File

@ -39,20 +39,6 @@ _unix_down(c3_c* pax_c, c3_c* sub_c)
return don_c;
}
/* _unix_opendir(): opendir, asserting.
*/
static DIR*
_unix_opendir(c3_c* pax_c)
{
DIR* rid_u = opendir(pax_c);
if ( !rid_u ) {
uL(fprintf(uH, "%s: %s\n", pax_c, strerror(errno)));
c3_assert(0);
}
return rid_u;
}
/* _unix_mkdir(): mkdir, asserting.
*/
static void
@ -64,6 +50,25 @@ _unix_mkdir(c3_c* pax_c)
}
}
/* _unix_opendir(): opendir, recreating if nonexistent.
*/
static DIR*
_unix_opendir(c3_c* pax_c)
{
DIR* rid_u = opendir(pax_c);
if ( !rid_u ) {
// uL(fprintf(uH, "%s: %s\n", pax_c, strerror(errno)));
_unix_mkdir(pax_c);
rid_u = opendir(pax_c);
if ( !rid_u ) {
uL(fprintf(uH, "%s: %s\n", pax_c, strerror(errno)));
c3_assert(0);
}
}
return rid_u;
}
/* _unix_unlink(): unlink, asserting.
*/
static void