Re: NSWorkspaceRecycleOperation bug
Re: NSWorkspaceRecycleOperation bug
- Subject: Re: NSWorkspaceRecycleOperation bug
- From: Annard Brouwer <email@hidden>
- Date: Fri, 25 May 2001 00:41:51 -0700
Hi Steve,
I reported this bug with Apple already. The only workaround is doing the
stuff yourself. here's a general "shell" approach:
1. Check if a ~/.Trash exists, create one if not
2. Use CpMac to copy file to the ~/.Trash directory -> done if this
succeeds
3. Use CpMac to copy the file appended with " Copy" -> done if this
succeeds
4. Loop with an increment on i and use CpMac to copy the file appened
with " Copy i" -> done if this succeeds
Finally remove the original.
A lot of work but this apporach is compatible with the Finder. I used
CpMac because if there is a resource fork in the file, you want to move
that too.
Cheers,
Annard
On Friday, May 25, 2001, at 12:13 , Steve Gehrman wrote:
NSWorkspaceRecycleOperation fails if there is already an item with the
same name in the Trash. It should work like the finder and change the
name to a unique name automatically.