summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--obnamlib/plugins/restore_plugin.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/obnamlib/plugins/restore_plugin.py b/obnamlib/plugins/restore_plugin.py
index 7075f82c..e7ef65f0 100644
--- a/obnamlib/plugins/restore_plugin.py
+++ b/obnamlib/plugins/restore_plugin.py
@@ -335,10 +335,7 @@ class RestorePlugin(obnamlib.ObnamPlugin):
hole_at_end = False
self.app.ts['current-bytes'] += len(data)
if hole_at_end:
- pos = f.tell()
- if pos > 0:
- f.seek(-1, 1)
- f.write('\0')
+ f.truncate()
def verify_chunk_checksum(self, data, chunk_id):
# FIXME: RepositoryInterface doesn't currently seem to provide