bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #32899] [NSFileManager createDirectoryAtPath:withIntermediateDirect


From: Chris Armstrong
Subject: [bug #32899] [NSFileManager createDirectoryAtPath:withIntermediateDirectories:attributes:error:] creates directories incorrectly
Date: Thu, 24 Mar 2011 12:21:54 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

URL:
  <http://savannah.gnu.org/bugs/?32899>

                 Summary: [NSFileManager
createDirectoryAtPath:withIntermediateDirectories:attributes:error:] creates
directories incorrectly
                 Project: GNUstep
            Submitted by: carmstrong
            Submitted on: Thu 24 Mar 2011 12:21:53 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The method in the summary does not create directories correctly when
withIntermediateDirectories == NO. In this case, it creates the last path
component in the current directory, which is the wrong behaviour. Please refer
to: 

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html#//apple_ref/doc/uid/20000305-SW5

I've created a patch that fixes this so it will create the right directory,
but only under the correct circumstances. I've also added a test case for it
too.

Note that I do not use -createDirectoryAtPath:attributes: because it is
implemented to create intermediate directories (even though it shouldn't).



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 24 Mar 2011 12:21:53 PM GMT  Name:
gnustep-base-NSFileManager-withIntermediateDirectories-fix.patch  Size: 2kB  
By: carmstrong
Patch to implement correctly + added test cases
<http://savannah.gnu.org/bugs/download.php?file_id=23005>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32899>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]