2
0
Эх сурвалжийг харах

need to reset errno before calling readdir

David Rose 22 жил өмнө
parent
commit
9778ec7a19

+ 1 - 0
dtool/src/dtoolutil/filename.cxx

@@ -1251,6 +1251,7 @@ scan_directory(vector_string &contents) const {
     return false;
   }
 
+  errno = 0;
   struct dirent *d;
   d = readdir(root);
   while (d != (struct dirent *)NULL) {