mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +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
a0c9b21004
commit
142034664f
1 changed files with 35 additions and 1 deletions
|
@ -692,7 +692,41 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (d != nil)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue