[Pythonmac-SIG] Finder Crash, after moving files....

has hengist.podd at virgin.net
Mon Jul 5 19:46:13 CEST 2004


Bob Ippolito wrote:

>  >> Have you tried using shutil.move instead?  It's probably a whole heck
>  >> of a lot faster anyway (though there's a chance it might not preserve
>  >> resource forks).
>  >
>  > shutil.__doc__ says it doesn't. Consider using ditto instead.
>
>If it's on the same volume, it will rename and that should preserve the
>resource fork.  In the copy case, it's probably MUCH MUCH less painful
>to just change the implementation to also copy resource forks than it
>is to spawn ditto and have it copy regardless of destination volume.
>Thousands and thousands of useless copies isn't a good thing to do if
>you don't need to, because it's really slow and it makes it a whole
>heck of a lot more likely that you will run out of disk space during
>the operation.

Just quoting the shutil docs. :) While ditto+rm are slow, they will 
do the job. But yeah, I agree that patching shutil to handle Mac 
files correctly in all cases would be the best [long-term] solution. 
(It'd also allow findertools to be dropped; no bad thing.)

has
-- 
http://freespace.virgin.net/hamish.sanderson/



More information about the Pythonmac-SIG mailing list