This commit is contained in:
Kovid Goyal 2010-02-20 11:34:28 -07:00
parent 58892090ce
commit a8ca7b362c

View File

@ -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: