mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
redo commit for minor bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34872 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0e7c60f779
commit
11e6e068de
3 changed files with 23 additions and 1 deletions
|
@ -12,6 +12,10 @@
|
|||
* Source/GSLocale.m (GSDefaultLanguageLocale): Add missing check
|
||||
for LC_MESSAGES definition.
|
||||
|
||||
2012-03-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m: fix for bug #35692
|
||||
|
||||
2012-03-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSString.m: Compatribility fix ... copy strings implicitly
|
||||
|
|
|
@ -1878,7 +1878,14 @@ static NSStringEncoding defaultEncoding;
|
|||
|
||||
if (error != NULL)
|
||||
{
|
||||
*error = [NSError _last];
|
||||
if (nil == d)
|
||||
{
|
||||
*error = [NSError _last];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
|
|
|
@ -12,6 +12,7 @@ int main()
|
|||
NSString *dir = @"NSFileManagerTestDir";
|
||||
NSString *dirInDir;
|
||||
NSString *str1,*str2;
|
||||
NSError *err;
|
||||
|
||||
dirInDir
|
||||
= [@"TestDirectory" stringByAppendingPathComponent: @"WithinDirectory"];
|
||||
|
@ -48,6 +49,16 @@ int main()
|
|||
PASS([NSUserName() isEqual: [attr fileOwnerAccountName]],
|
||||
"newly created file is owned by current user");
|
||||
NSLog(@"'%@', '%@'", NSUserName(), [attr fileOwnerAccountName]);
|
||||
attr = [mgr attributesOfItemAtPath: dir error: &err];
|
||||
PASS(attr != nil && err == nil,
|
||||
"[NSFileManager attributesOfItemAtPath:error:] returns non-nil for "
|
||||
"attributes and nil for error in the case of existing file");
|
||||
attr = [mgr attributesOfItemAtPath:
|
||||
[dir stringByAppendingPathComponent:
|
||||
@"thispathMUSTNOTexistatyoursystem"] error: &err];
|
||||
PASS(attr == nil && err != nil,
|
||||
"[NSFileManager attributesOfItemAtPath:error:] returns nil for "
|
||||
"attributes and non-nil for error in the case of non-existent file");
|
||||
}
|
||||
|
||||
PASS([mgr changeCurrentDirectoryPath: dir],
|
||||
|
|
Loading…
Reference in a new issue