Re: URLByResolvingBookmarkData not case sensitive
Re: URLByResolvingBookmarkData not case sensitive
- Subject: Re: URLByResolvingBookmarkData not case sensitive
- From: Jens Alfke <email@hidden>
- Date: Tue, 06 Jan 2015 21:56:35 -0800
> On Jan 6, 2015, at 9:37 PM, Trygve Inda <email@hidden> wrote:
>
> When adding new files, I need to make sure the file is not already in the
> database so I compare the paths.
That's not reliable. Different paths does not mean different files, even without case-folding. There are symlinks and hard-links and weird Unicode encoding issues that can all result in multiple paths that point to the same file.
My hunch is you'd need to compare the file IDs, but that will only work on HFS+. If you need to support FAT or network volumes, it gets more complicated. (But I'm not a filesystem expert.)
—Jens
_______________________________________________
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