gesomax / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Default file cache doesn't work on windows #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In order to write binary data to a file on windows the 'wb' mode must be
used. The default flat file cache opens all files in text mode. Regrettable
text mode on windows translates the file corrupting things.

The same problems hold true for reading files as well.

The solution is to use the 'b' modes when doing file io. These modes have
no effect on other platforms (AFAIK)

Original issue reported on code.google.com by n...@longsincefaded.com on 6 Sep 2008 at 6:25

GoogleCodeExporter commented 8 years ago
Fixed previously, forgot to mark it as fixed here.

Original comment by joe.gregorio@gmail.com on 16 Jul 2009 at 7:40