git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36275 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2013-03-05 14:06:25 +00:00
parent 5039bf29c9
commit 2f99ae8e99

View file

@ -20,8 +20,7 @@ int main()
BOOL exists;
BOOL isDir;
dirInDir
= [@"TestDirectory" stringByAppendingPathComponent: @"WithinDirectory"];
dirInDir = [dir stringByAppendingPathComponent: @"WithinDirectory"];
PASS(mgr != nil && [mgr isKindOfClass: [NSFileManager class]],
"NSFileManager understands +defaultManager");
@ -201,7 +200,7 @@ NSLog(@"'%@', '%@'", NSUserName(), [attr fileOwnerAccountName]);
[mgr changeCurrentDirectoryPath: [[[mgr currentDirectoryPath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]];
exists = [mgr fileExistsAtPath: dir isDirectory: &isDir];
if (exists || isDir)
if (exists && isDir)
{
PASS([mgr removeFileAtPath: dir handler: nil],
"NSFileManager removes a directory");