Changeset 8225 in orxonox.OLD for branches/gui/src/lib
- Timestamp:
- Jun 8, 2006, 10:32:45 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/util/directory.cc
r8224 r8225 68 68 #if not defined(__WIN32__) 69 69 DIR* handle; 70 if (handle != NULL)71 this->close();72 70 handle = opendir(this->name().c_str()); 73 71 if (!handle) … … 78 76 #else 79 77 HANDLE handle; 80 if (handle != INVALID_HANDLE_VALUE)81 this->close();82 78 83 79 // First check the attributes trying to access a non-Directory with … … 107 103 // BUILDING the list of contained Files. (only the names) 108 104 #if not defined(__WIN32__) 109 while (dirent* entry = readdir(handle)) 105 dirent* entry; 106 while ((entry = readdir(handle)) != NULL) 110 107 this->_fileNames.push_back(entry->d_name); 111 108 closedir(handle); 112 109 #else 113 110 WIN32_FIND_DATA entry; 114 while ( int ok = FindNextFile(handle, &entry))111 while ((int ok = FindNextFile(handle, &entry)) != 0) 115 112 this->_fileNames.push_back(entry.cFileName); 116 113 FindClose(handle);
Note: See TracChangeset
for help on using the changeset viewer.