Browse Source

need to reset errno before calling readdir

David Rose 21 years ago
parent
commit
9778ec7a19
1 changed files with 1 additions and 0 deletions
  1. 1 0
      dtool/src/dtoolutil/filename.cxx

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

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