NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDirectory;
NSError *error = nil;
- if (![fileManager fileExistsAtPath:containerDirectoryPath isDirectory:&isDirectory] &&
- (![fileManager createDirectoryAtPath:containerDirectoryPath withIntermediateDirectories:YES attributes:nil error:&error] ||
- error)) {
- [PithosUtilities fileActionFailedAlertWithTitle:@"Local Sync Directory Error"
- message:[NSString stringWithFormat:@"Cannot create local sync directory at '%@'", containerDirectoryPath]
- error:error];
- @synchronized(self) {
- syncOperationCount = 0;
+ if (![fileManager fileExistsAtPath:containerDirectoryPath isDirectory:&isDirectory]) {
+ if (![fileManager createDirectoryAtPath:containerDirectoryPath withIntermediateDirectories:YES attributes:nil error:&error] ||
+ error) {
+ [PithosUtilities fileActionFailedAlertWithTitle:@"Local Sync Directory Error"
+ message:[NSString stringWithFormat:@"Cannot create local sync directory at '%@'", containerDirectoryPath]
+ error:error];
+ @synchronized(self) {
+ syncOperationCount = 0;
+ }
+ return;
}
- return;
} else if (!isDirectory) {
[PithosUtilities fileActionFailedAlertWithTitle:@"Local Sync Directory Error"
message:[NSString stringWithFormat:@"File already exists at the local sync directory path at '%@'", containerDirectoryPath]