Attempt to improve app location

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13902 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-06-17 15:03:58 +00:00
parent 891fa14fc5
commit 8e986bb0db
2 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,7 @@
2002-06-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSWorkspace.m: Vague attempt to improve locating of apps
2002-06-15 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSOutlineView.m a number of improvements:

View file

@ -506,9 +506,17 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
{
NSString *ext = [appName pathExtension];
if (ext == nil)
if ([ext length] == 0)
{
appName = [appName stringByAppendingPathExtension: @"app"];
appName = [last stringByAppendingPathExtension: @"app"];
if ([applications objectForKey: appName] == nil)
{
appName = [last stringByAppendingPathExtension: @"debug"];
if ([applications objectForKey: appName] == nil)
{
appName = [last stringByAppendingPathExtension: @"profile"];
}
}
}
return [applications objectForKey: appName];
}
@ -1091,7 +1099,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
{
NSString *path;
if (appName == nil)
if ([appName length] == 0)
{
return nil;
}
@ -1102,14 +1110,10 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
path = [self fullPathForApplication: appName];
appName = [[path lastPathComponent] stringByDeletingPathExtension];
}
else if ([appName pathExtension] == nil)
else if ([[appName pathExtension] length] == 0)
{
path = [path stringByAppendingPathExtension: @"app"];
}
else
{
appName = [[path lastPathComponent] stringByDeletingPathExtension];
}
if (path == nil)
{