Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
- Subject: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
- From: Laurent Daudelin <email@hidden>
- Date: Fri, 25 Mar 2011 13:20:43 -0700
On Mar 25, 2011, at 12:13, Sean McBride wrote:
> On Fri, 25 Mar 2011 12:08:53 -0700, Laurent Daudelin said:
>
>> If that makes any difference, I'm running the copy method from an
>> NSOperation but each copy is done sequentially. I thought about creating
>> one NSOperation for each item to copy in a given folder but thought that
>> was many not very wise.
>
> Maybe you're seeing a weirdo threading bug, what if you try everything
> on the main thread?
Just did a couple of runs in the main thread. Besides being almost unable to update my progress sheet and the app totally non-responsive, no change in the results. There are still copies that didn't have their modification dates set properly. And they vary from one run to the other.
It is just totally weird. I just can't understand why the failures and how poor those methods are performing on Apple Filing Protocol volumes. As it is now, there are *NO* API for me that can reliably copy items from a local disk to an AFP remote volume. My last resort would be to use "cp" in an NSTask, but I don't want to do that. I have tried "FSCopyObjectSync", "copyPath:toPath:handler:" and "copyItemAtPath:toPath:error:" and they all fail randomly.
I'm going to submit a bug but I'm surprised that these issues are unknown.
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
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