Closed GoogleCodeExporter closed 9 years ago
Forgot to add, that I tested Python 2.6 zipfile module functionality with
similar test case and it seems to work ok - no line ending conversion happening.
Original comment by make...@gmail.com
on 30 Jan 2012 at 2:43
Ah, simple patch like this fixes the issue:
diff -Naur fs-0.4.0.1-py2.6.egg/fs/zipfs.py fs-0.4.0.1-py2.6.new/fs/zipfs.py
--- fs-0.4.0.1-py2.6.egg/fs/zipfs.py 2012-01-30 10:20:00.368608813 +0200
+++ fs-0.4.0.1-py2.6.new/fs/zipfs.py 2012-01-30 16:51:51.000000000 +0200
@@ -37,7 +37,7 @@
def __init__(self, fs, filename, close_callback):
self.fs = fs
self.filename = filename
- self._file = self.fs.open(filename, 'w+')
+ self._file = self.fs.open(filename, 'wb+')
self.close_callback = close_callback
def write(self, data):
Original comment by make...@gmail.com
on 30 Jan 2012 at 2:54
That looks as though it has already been fixed in trunk. Have added your test
though. Thanks.
Original comment by willmcgugan
on 30 Jan 2012 at 3:13
It was fixed here :)
http://code.google.com/p/pyfilesystem/issues/detail?id=80
Original comment by gc...@loowis.durge.org
on 30 Jan 2012 at 3:19
Original issue reported on code.google.com by
make...@gmail.com
on 30 Jan 2012 at 2:41Attachments: