mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
clean up and comment last fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34033 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
709440ce98
commit
4d2b2b728e
2 changed files with 21 additions and 7 deletions
|
@ -677,13 +677,13 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
|
|||
{
|
||||
#if defined(__MINGW__)
|
||||
fprintf(stderr,
|
||||
"The file '%S' is writable by someone other than"
|
||||
"\nThe file '%S' is writable by someone other than"
|
||||
" its owner (permissions 0%lo).\nIgnoring it.\n",
|
||||
[defs fileSystemRepresentation],
|
||||
(long)[attributes filePosixPermissions]);
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"The file '%s' is writable by someone other than"
|
||||
"\nThe file '%s' is writable by someone other than"
|
||||
" its owner (permissions 0%lo).\nIgnoring it.\n",
|
||||
[defs fileSystemRepresentation],
|
||||
(long)[attributes filePosixPermissions]);
|
||||
|
@ -694,6 +694,11 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
|
|||
{
|
||||
NSString *s;
|
||||
|
||||
/* Here we load the string and convert to a property list
|
||||
* rather than using higher-level methods likely to raise
|
||||
* an exception or otherwise use the NSUserDefaults
|
||||
* system and cause recursion on error.
|
||||
*/
|
||||
s = [[NSString allocWithZone: NSDefaultMallocZone()]
|
||||
initWithContentsOfFile: defs];
|
||||
if (nil == s)
|
||||
|
@ -705,6 +710,10 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
|
|||
NS_DURING
|
||||
{
|
||||
d = [s propertyList];
|
||||
if (NO == [d isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
d = nil;
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -717,13 +726,13 @@ addDefaults(NSString *defs, NSMutableDictionary *conf)
|
|||
{
|
||||
#if defined(__MINGW__)
|
||||
fprintf(stderr,
|
||||
"The file '%S' is not readable as a propety list"
|
||||
".\nIgnoring it.\n",
|
||||
"\nThe file '%S' is not parseable as a property list"
|
||||
" containing a dictionary.\nIgnoring it.\n",
|
||||
[defs fileSystemRepresentation]);
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"The file '%s' is not readable as a propety list"
|
||||
".\nIgnoring it.\n",
|
||||
"\nThe file '%s' is not parseable as a property list"
|
||||
" containing a dictionary.\nIgnoring it.\n",
|
||||
[defs fileSystemRepresentation]);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue