diff --git a/src/calibre/devices/usbms/cli.py b/src/calibre/devices/usbms/cli.py index 829267a0b8..1554d6fce0 100644 --- a/src/calibre/devices/usbms/cli.py +++ b/src/calibre/devices/usbms/cli.py @@ -49,7 +49,7 @@ class CLI(object): d = os.path.dirname(path) if not os.path.exists(d): os.makedirs(d) - with open(path, 'wb') as dest: + with open(path, 'w+b') as dest: try: shutil.copyfileobj(infile, dest) except IOError: