fixup error in last change

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27324 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-12-17 13:26:17 +00:00
parent 06222a4902
commit fb29f5680c
2 changed files with 19 additions and 6 deletions

View file

@ -2385,10 +2385,18 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
info = [apps objectForKey: appName];
str = [info objectForKey: @"NSRole"];
if (str == nil
|| [str isEqualToString: @"Editor"]
|| [str isEqualToString: @"Viewer"]
|| [str isEqualToString: @""])
/* NB. If str is nil or an empty string, there is no role set,
* and we treat this as an Editor since the role is unrestricted.
*/
if ([str length] == 0 || [str isEqualToString: @"Editor"])
{
if (app != 0)
{
*app = appName;
}
return YES;
}
if ([str isEqualToString: @"Viewer"])
{
if (app != 0)
{