test: io: update i/o api usage re: b_error

This commit is contained in:
2025-07-28 22:22:14 +01:00
parent 0ab1855105
commit ad4eba6cc1
3 changed files with 28 additions and 9 deletions

View File

@@ -13,11 +13,10 @@ int main(int argc, const char **argv)
b_directory *dir = NULL;
b_path *path = b_path_create_from_cstr(argv[1]);
b_status status = b_directory_open(B_DIRECTORY_ROOT, path, &dir);
b_result result = b_directory_open(B_DIRECTORY_ROOT, path, 0, &dir);
if (!B_OK(status)) {
printf("cannot open %s\n", b_path_ptr(path));
printf("%s\n", b_status_to_string(status));
if (b_result_is_error(result)) {
b_throw(result);
return -1;
}