Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 2b02a40

Browse files
committed
Clean errno in path_exists
Caught by @Ciremun
1 parent 254c68b commit 2b02a40

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nobuild.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ int path_exists(Cstr path)
943943
struct stat statbuf = {0};
944944
if (stat(path, &statbuf) < 0) {
945945
if (errno == ENOENT) {
946+
errno = 0;
946947
return 0;
947948
}
948949

0 commit comments

Comments
 (0)