On Apr 9, 2012, at 7:05 PM, Jerry Krinock wrote:

> In current documentation, CFURLCopyStrictPath() still has the ambiguity, but 
> CFURLCopyPath() has been corrected.  It says, unambiguously, "nor does it 
> replace percent escape sequences".

The documentation says:

"This function does not resolve the URL against its base and replaces all 
percent escape sequences. This function's return value does not include a 
leading slash and uses isAbsolute to report whether the URL's path is absolute.”

That’s not ambiguous; it’s just wrong. The documentation states completely 
unambiguously that it *does* replace percent escapes and that it *doesn’t* 
leave the trailing slash on there. Unfortunately, I just tried it and you are 
correct; the function does not behave in the manner described by the 
documentation. This is a problem, because if you’re getting a path to provide 
to a path-based function or method, you need to resolve the percent escapes or 
it obviously won’t work.

Fortunately, CFURLCopyFileSystemPath with kCFURLPOSIXPathStyle *does* seem to 
provide a path similar to -path (and I just tested it), so it is doable.

Charles


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to