Changeset 1815 for trunk/gsdl/lib
- Timestamp:
- 2000-12-19T21:37:24+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/fileutil.cpp
r1813 r1815 159 159 strcat (dirpath, "\\*"); 160 160 161 hSearch = FindFirstFile(dirpath, &FileData); 161 hSearch = FindFirstFile(dirpath, &FileData); 162 if (hSearch == INVALID_HANDLE_VALUE) { 163 delete dirpath; 164 return false; 165 } 166 167 FindClose (hSearch); 162 168 // freeing this memory can cause a runtime error on some (particularly 163 169 // debug) versions of VC++ 164 // delete dirpath; 165 166 if (hSearch == INVALID_HANDLE_VALUE) { 167 return false; 168 } 170 delete dirpath; 169 171 return true; 170 172 } … … 178 180 179 181 hSearch = FindFirstFile(dirpath, &FileData); 180 // freeing this memory can cause a runtime error on some (particularly181 // debug) versions of VC++182 // delete dirpath;183 184 182 if (hSearch == INVALID_HANDLE_VALUE) { 183 delete dirpath; 185 184 return false; 186 185 } … … 198 197 199 198 FindClose(hSearch); 199 // freeing this memory can cause a runtime error on some (particularly 200 // debug) versions of VC++ 201 delete dirpath; 200 202 201 203 return true; … … 210 212 211 213 hSearch = FindFirstFile(dirpath, &FileData); 212 // freeing this memory can cause a runtime error on some (particularly213 // debug) versions of VC++214 // delete dirpath;215 216 214 if (hSearch == INVALID_HANDLE_VALUE) { 215 delete dirpath; 217 216 return false; 218 217 } … … 230 229 231 230 FindClose(hSearch); 232 231 // freeing this memory can cause a runtime error on some (particularly 232 // debug) versions of VC++ 233 delete dirpath; 234 233 235 return true; 234 236 }
Note:
See TracChangeset
for help on using the changeset viewer.