Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
- Subject: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
- From: Gabriel Zachmann <email@hidden>
- Date: Fri, 30 Oct 2009 21:09:50 +0100
I think I've found an inconsistency in Cocoa's handling of slashes and
colons when handling path names.
Or, maybe someone could correct me, please.
I retrieve a numer of files from a Spotlight query and store them in
an array.
Then, I print the file paths, and get something like this:
0. file = w: slash/detail_soldiers.jpg
1. file = w: slash/lot2.jpg
2. file = 2005-03-20 11-59-13.NEF
etc.
Fine, so far.
Then, I do
[imagefiles_ componentsJoinedByString: @"\n"]
and print the result, and I get
joined names = w\n slash/detail_soldiers.jpg\nw\n slash/lot2.jpg
\n2005-03-20 11-59-13.NEF\netc.
Which is a bug, IMHO.
(Why should componentsJoinedByString be concerned with path separators
in the first place??)
Or am I missing something? Should I be doing something differently?
If so, what would be the correct way to do it?
(I do need to do -componentsJoinedByString of the paths eventually.)
Regards,
Gabriel.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden