Skip to content

Commit

Permalink
Don't check if the object's already been created.
Browse files Browse the repository at this point in the history
This is already done in `fileObjectWithPath
  • Loading branch information
pjrobertson committed Jan 27, 2012
1 parent 33eeca2 commit d2bc207
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -346,11 +346,8 @@ - (NSArray *)validIndirectObjectsForAction:(NSString *)action directObject:(QSOb
NSMutableArray *fileObjects = [[[QSLibrarian sharedInstance] arrayForType:QSFilePathType] mutableCopy];
BOOL isDirectory;
NSString *currentFolderPath = [[[[dObject splitObjects] lastObject] singleFilePath] stringByDeletingLastPathComponent];
QSObject *currentFolderObject = [QSObject objectWithIdentifier:currentFolderPath];
if (!currentFolderObject) {
// if it wasn't in the catalog, create it from scratch
currentFolderObject = [QSObject fileObjectWithPath:currentFolderPath];
}
// if it wasn't in the catalog, create it from scratch
QSObject *currentFolderObject = [QSObject fileObjectWithPath:currentFolderPath];
[fileObjects removeObject:currentFolderObject];
[fileObjects insertObject:currentFolderObject atIndex:0];
NSWorkspace *ws = [[NSWorkspace sharedWorkspace] retain];
Expand Down

0 comments on commit d2bc207

Please sign in to comment.