27 May
2007
27 May
'07
6:54 p.m.
On 5/27/07, Einar Næss Jensen <einar.nass.jensen@gmail.com> wrote:
this snippet behaves differently on windows and linux: http://zope.pastey.net/42188-1gbl
I would be thankful of any clues to why. in linux it copies a gif picture off the filesystem and into the zodb. In windows. the object gets created but no gif is present.also no errors in the log
Use open(dir, 'rb').read() instead, opening the file in binary mode. Windows treats textfiles and binary files differently, thus mangling your GIF file if opened in text mode. -- Martijn Pieters