mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
sync palliative: don't assert, recreate
This commit is contained in:
parent
4daa9a6ed9
commit
a1055f57cb
33
v/unix.c
33
v/unix.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user