FWIW, I recently had a very similar problem bite me, and had to set the binary mode to fix it. I _thought_ I had tested the offending code, and maybe I did?? I am still on web 09.07.2; the code has been with me since 6-08, and I noted the failure last month. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Keith Hodges Sent: Thursday, September 03, 2009 4:31 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] [Bulk] Re: Rio: binary mode copy not keep Vicnet wrote:
Hello,
Keith Hodges a écrit :
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file.
an input what?
UTF8TextConverter(Object)>>error:'Invalid utf8 input detected'
In fact, there is nothing to deal with FileJpeg, File make the same error on my image (Exupery with Pharo on Windows).
I try to add binary mode : base binary addTree: dest.
Files from base are not copy in binary mode.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ? Directory home binary files first isBinary ==> false ! Should it be true ?
copyLocalFile:toLocalFile: chooses from a variety of copying methods I understand that there is a bug here
Not sure that the pb
What the heck is pb?
is here.
I think it is in #entries (or #files,...) method that collect files from source dir without reporting binary mode from parent. Peharps, #select: should do the job ?
but I am not really sure what the problem is with the jpeg file.
Rigth, the pb is not with jpeg but with copy mode that not transmit.
However, here is a suggestion: FileKernel>>entries is defined as self select: [:e | true ] a block that only return true is strnage for me. Why not #contentsIn: in executive that return all entries (like contents in Collection) ?
Because #select: already does everything you need in an elegant manner. The squeak wiki Rio page documents this
a+ Vicnet
Sorry but I dont understand most of your email. All file copies are in binary mode by default, so there should be no need to copy the binary flag. Keith _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project