quick hack for bug 34603

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34032 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-10-19 21:38:52 +00:00
parent b9fdefed8e
commit 709440ce98

View file

@ -692,7 +692,41 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
}
else
{
d = [NSDictionary dictionaryWithContentsOfFile: defs];
NSString *s;
s = [[NSString allocWithZone: NSDefaultMallocZone()]
initWithContentsOfFile: defs];
if (nil == s)
{
d = nil;
}
else
{
NS_DURING
{
d = [s propertyList];
}
NS_HANDLER
{
d = nil;
}
NS_ENDHANDLER
RELEASE(s);
}
if (nil == d)
{
#if defined(__MINGW__)
fprintf(stderr,
"The file '%S' is not readable as a propety list"
".\nIgnoring it.\n",
[defs fileSystemRepresentation]);
#else
fprintf(stderr,
"The file '%s' is not readable as a propety list"
".\nIgnoring it.\n",
[defs fileSystemRepresentation]);
#endif
}
}
if (d != nil)