mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 20:30:37 +00:00
Conform to documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19334 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c43091d8d
commit
598b8a4111
2 changed files with 8 additions and 7 deletions
|
@ -611,13 +611,11 @@ static NSDictionary *TypeInfoForName (NSArray *types, NSString *typeName)
|
|||
NSString *directory;
|
||||
BOOL isDir = NO;
|
||||
|
||||
if (document == nil)
|
||||
document = [[self documents] lastObject];
|
||||
directory = [[document fileName] stringByDeletingLastPathComponent];
|
||||
if (directory == nil)
|
||||
directory = [[NSUserDefaults standardUserDefaults]
|
||||
objectForKey: NSDefaultOpenDirectory];
|
||||
if (directory == nil
|
||||
if (document)
|
||||
directory = [[document fileName] stringByDeletingLastPathComponent];
|
||||
else
|
||||
directory = [[NSOpenPanel openPanel] directory];
|
||||
if (directory == nil || [directory isEqual: @""]
|
||||
|| [manager fileExistsAtPath: directory isDirectory: &isDir] == NO
|
||||
|| isDir == NO)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue