Skip to content

Commit

Permalink
any negative return value from uv_fs_open is an error
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Jul 15, 2024
1 parent 3996e28 commit 7fa2945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ int load_file(const char *path, size_t pathlen, char **content, size_t *size) {
f = uv_fs_open(NULL, &fs_req, path, 0, O_RDONLY, NULL);
}

if (f == -1) {
if (f < 0) {
ZITI_LOG(ERROR, "%s - %s", path, strerror(errno));
return rc;
}
Expand Down

0 comments on commit 7fa2945

Please sign in to comment.