test: io: update i/o api usage re: b_error
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user