Re: EnumeratorAtPath and duplicate files during drag to open

2010-02-03 Thread Jerry Krinock
On 2010 Feb 03, at 21:06, Trygve Inda wrote: > Do I just need to keep a temporary array of paths that I have processed and > search it for each file. That's one way that would work. Another way would be to, before processing each item, iterate through its lineage, somethling like this: pa

Re: EnumeratorAtPath and duplicate files during drag to open

2010-02-03 Thread Jens Alfke
On Feb 3, 2010, at 9:06 PM, Trygve Inda wrote: > This becomes a real issue if someone drops DirectoryA and DirectoryB if > DirectoryB is in the tree below DirectoryA... Since a bunch of files could > be re-processed. Convert each input path into canonical form (to resolve symlinks), sort them a

EnumeratorAtPath and duplicate files during drag to open

2010-02-03 Thread Trygve Inda
If a user drags 3 Finder objects to my "file processor" app... DirectoryA FileA FileB And FileA is in the directory tree below DirectoryA, what is the best way to avoid processing the file twice? When I get the array of paths in my drop handler, when I see the directory, I use EnumeratorAtPath t