- Timestamp:
- 03/08/13 15:59:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mbase/MDirIter.cc
r14853 r14993 348 348 // Check for rread perissions 349 349 return !gSystem->AccessPathName(fqp, kReadPermission); 350 351 350 } 352 351 … … 374 373 TString MDirIter::Next(Bool_t nocheck) 375 374 { 376 fDirPtr = Open(); 377 if (!fDirPtr) 378 return ""; 379 380 // Get next entry in dir, if existing check validity 381 const char *n = gSystem->GetDirEntry(fDirPtr); 382 if (n) 383 return nocheck || CheckEntry(n) ? ConcatFileName(fCurrentPath->GetName(), n) : Next(); 384 385 // Otherwise close directory and try to get next entry 386 Close(); 387 return Next(); 375 while (1) 376 { 377 fDirPtr = Open(); 378 if (!fDirPtr) 379 break; 380 381 // Get next entry in dir, if existing check validity 382 const char *n = gSystem->GetDirEntry(fDirPtr); 383 if (!n) 384 { 385 // Otherwise close directory and try to get next entry 386 Close(); 387 continue; 388 } 389 390 if (nocheck || CheckEntry(n)) 391 return ConcatFileName(fCurrentPath->GetName(), n); 392 } 393 394 return ""; 388 395 } 389 396
Note:
See TracChangeset
for help on using the changeset viewer.