bugGNUstep - Bugs: bug #32899, [NSFileManager...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32899: [NSFileManager createDirectoryAtPath:withIntermediateDirectories:attributes:error:] creates directories incorrectly

Submitted by:  Chris Armstrong <carmstrong>
Submitted on:  Thu 24 Mar 2011 12:21:53 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

Thu 07 Apr 2011 05:15:45 AM UTC, comment #1:

Thanks ... I applied that patch. Great to have a testcase includeed.

Richard Frith-Macdonald <CaS>
Project Member
Thu 24 Mar 2011 12:21:53 PM UTC, original submission:

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).

Chris Armstrong <carmstrong>

 

Attached Files
file #23005:  gnustep-base-NSFileManager-withIntermediateDirectories-fix.patch added by carmstrong (2KiB - application/octet-stream - Patch to implement correctly + added test cases)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by carmstrong (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Apr 2011 05:15:45 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Thu 24 Mar 2011 12:21:53 PM UTCcarmstrongAttached File-=>Added gnustep-base-NSFileManager-withIntermediateDirectories-fix.patch, #23005

    Back to the top


    Powered by Savane 3.1-cleanup1