##// END OF EJS Templates
largefiles: copy files in binary mode (issue3164)
Matt Mackall -
r15699:84e55467 stable
parent child Browse files
Show More
@@ -79,7 +79,7 b' def link(src, dest):'
79 79 except OSError:
80 80 # if hardlinks fail, fallback on atomic copy
81 81 dst = util.atomictempfile(dest)
82 for chunk in util.filechunkiter(open(src)):
82 for chunk in util.filechunkiter(open(src, 'rb')):
83 83 dst.write(chunk)
84 84 dst.close()
85 85 os.chmod(dest, os.stat(src).st_mode)
@@ -238,7 +238,7 b' def copytostoreabsolute(repo, file, hash'
238 238 link(usercachepath(repo.ui, hash), storepath(repo, hash))
239 239 else:
240 240 dst = util.atomictempfile(storepath(repo, hash))
241 for chunk in util.filechunkiter(open(file)):
241 for chunk in util.filechunkiter(open(file, 'rb')):
242 242 dst.write(chunk)
243 243 dst.close()
244 244 util.copymode(file, storepath(repo, hash))
General Comments 0
You need to be logged in to leave comments. Login now