BOOL isDirectory;
BOOL fileExists = [fileManager fileExistsAtPath:filePath isDirectory:&isDirectory];
NSError *error = nil;
- NSString *containerDirectoryPath = [self dirPathForAccount:accountName container:pithosContainer.name];
- NSString *newFilePath = [filePath stringByReplacingOccurrencesOfString:containerDirectoryPath withString:self.tempTrashDirPath];
+ NSString *newFilePath = [filePath stringByReplacingOccurrencesOfString:directoryPath withString:self.tempTrashDirPath];
NSString *newDirPath = [newFilePath stringByDeletingLastPathComponent];
if (fileExists && isDirectory) {
NSArray *subPaths = [fileManager subpathsOfDirectoryAtPath:filePath error:&error];
}
for (NSString *subPath in subPaths) {
NSString *subFilePath = [filePath stringByAppendingPathComponent:subPath];
- NSString *newSubFilePath = [subFilePath stringByReplacingOccurrencesOfString:containerDirectoryPath
+ NSString *newSubFilePath = [subFilePath stringByReplacingOccurrencesOfString:directoryPath
withString:self.tempTrashDirPath];
currentState = [currentLocalObjectStates objectForKey:subFilePath];
if (currentState) {