URL: <http://savannah.gnu.org/bugs/?35672>
Summary: -[NSFileManager createDirectoryAtPath:attributes:] should not create intermediate dirs Project: GNUstep Submitted by: snej Submitted on: Wed 29 Feb 2012 08:16:23 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 GNUstep implementation of -[NSFileManager createDirectoryAtPath:attributes:] creates intermediate directories in the path if they don't exist; e.g. if called on @"/tmp/foo/bar/baz" it will create directories "foo" and "bar" if they don't exist, instead of failing. This contradicts the documented and actual behavior of Apple's implementation in the Foundation framework. The docs for that method state "The directory to be created must not yet exist, but its parent directory must exist." I know from experience that this is the actual behavior. A fringe benefit of fixing this is that the implementation of the method looks like it will get a lot simpler :) A side effect is that -[NSFileManager createDirectoryAtPath: withIntermediateDirectories: attributes: error:] will create intermediate directories even if the corresponding parameter is NO, because it in that case it calls into the older version of the method. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?35672> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-gnustep mailing list Bug-gnustep@gnu.org https://lists.gnu.org/mailman/listinfo/bug-gnustep