Show Package Contents work for packages with own data source

For example Xcode projects now have their target (URL) set to xcodeproject://path/to/project/file which would cause Show Package Contents to not work, as it expected a file URL.
This commit is contained in:
Allan Odgaard
2012-09-03 17:14:38 +02:00
parent 55c0109fa9
commit 8c55703dea

View File

@@ -340,6 +340,12 @@ static NSURL* ParentForURL (NSURL* url)
if([item.target isFileURL])
return (void)[self showURL:item.target];
}
for(FSItem* item in self.selectedItems)
{
if([item.target path] && path::is_directory([[item.target path] fileSystemRepresentation]))
return (void)[self showURL:[NSURL fileURLWithPath:[item.target path]]];
}
}
- (void)showSelectedEntriesInFinder:(id)sender