> On Jan 6, 2015, at 9:37 PM, Trygve Inda <cocoa...@xericdesign.com> 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 (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