Allow selection of .git directories in the modal dialog

This commit is contained in:
Pieter de Bie
2008-09-12 12:45:06 +02:00
parent bcba52e3d9
commit 4dde9f3095
+2 -2
View File
@@ -14,9 +14,9 @@
// selection of directories
- (NSInteger)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)extensions
{
[openPanel setCanChooseFiles:NO];
[openPanel setCanChooseFiles:YES];
[openPanel setCanChooseDirectories:YES];
return [openPanel runModalForDirectory:nil file:nil types:nil];
return [openPanel runModalForDirectory:nil file:nil types:[NSArray arrayWithObject: @"git"]];
}
// Convert paths to the .git dir before searching for an already open document