The default mode when calling open is 'r'. This is fine on most
platforms but on Windows, files must be opened with 'rb' to avoid
problems when reading binary files (like .torrent files).
Without this change, torrent files added on Windows are frequently
truncated when being sent leading to an HTTP 400 error from the put.io
web service.
The default mode when calling
open
is 'r'. This is fine on most platforms but on Windows, files must be opened with 'rb' to avoid problems when reading binary files (like .torrent files).Without this change, torrent files added on Windows are frequently truncated when being sent leading to an HTTP 400 error from the put.io web service.
Signed-off-by: Paul Osborne osbpau@gmail.com