Skip to content
Snippets Groups Projects
Commit 25097b4d authored by Inada Naoki's avatar Inada Naoki
Browse files

remotefilelog: fix opening validatecachelog in text mode

parent 969527ac
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@
data = shallowutil.readfile(filepath)
if self._validatecache and not self._validatedata(data, filepath):
if self._validatecachelog:
with open(self._validatecachelog, b'a+') as f:
with open(self._validatecachelog, b'ab+') as f:
f.write(b"corrupt %s during read\n" % filepath)
os.rename(filepath, filepath + b".corrupt")
raise KeyError(b"corrupt local cache file %s" % filepath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment