mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
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:
parent
b9fdefed8e
commit
709440ce98
1 changed files with 35 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue