Some workarounds for Haiku. uv_fs_scandir can't tell if a dirent is a file. setrlimit doesn't do anything productive for us.

This commit is contained in:
2024-03-05 20:49:16 -05:00
parent 3a392d4a9f
commit d059554464
2 changed files with 9 additions and 1 deletions

View File

@ -128,7 +128,11 @@ static void _tf_ssb_import_recursive_add_files(tf_ssb_t* ssb, uv_loop_t* loop, J
uv_dirent_t ent;
while (uv_fs_scandir_next(&req, &ent) == 0)
{
if (ent.type == UV_DIRENT_FILE)
if (ent.type == UV_DIRENT_FILE
#if defined(__HAIKU__)
|| ent.type == UV_DIRENT_UNKNOWN
#endif
)
{
size_t len = strlen(path) + strlen(ent.name) + 2;
char* full_path = tf_malloc(len);