Browse Source

Clean errno in path_exists

Caught by @Ciremun
rexim 4 years ago
parent
commit
2b02a40bd0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      nobuild.h

+ 1 - 0
nobuild.h

@@ -943,6 +943,7 @@ int path_exists(Cstr path)
     struct stat statbuf = {0};
     if (stat(path, &statbuf) < 0) {
         if (errno == ENOENT) {
+            errno = 0;
             return 0;
         }