Browse files

Small tweak.

  • Loading branch information...
1 parent 7b004ba commit edfa2596c8ca0e3aac400a1557d5b5f2145aaa58 @pk committed Oct 28, 2011
Showing with 2 additions and 7 deletions.
  1. +2 −7 PKToolbox/Sources/Foundation/NSFileManager+PKCopyDirectory.m
View
9 PKToolbox/Sources/Foundation/NSFileManager+PKCopyDirectory.m
@@ -24,15 +24,10 @@ - (BOOL)pk_copyDirectoryAtPath:(NSString *)srcDirectoryPath
// Outer loop is neccessary to release srcFile because enumerator somehow
// release all after ALL iterations. So we force release using inner pool.
- BOOL enumeratorFinished = NO;
- while(!enumeratorFinished) {
+ while(YES) {
@autoreleasepool {
NSString *srcFile = [enumerator nextObject];
- if (srcFile == nil) {
- enumeratorFinished = YES;
- break;
- }
-
+ if (srcFile == nil) break;
didCopy = YES;
NSString *srcFilePath = [srcDirectoryPath stringByAppendingPathComponent:srcFile];

0 comments on commit edfa259

Please sign in to comment.