call fd.flush() to make sure mtime isn't modified on fd.close()

This commit is contained in:
Jonas Borgström 2013-07-19 13:13:54 +02:00
parent e2648aebb0
commit 576daaf38b
2 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,14 @@ Attic Changelog
Here you can see the full list of changes between each darc release.
Version 0.6.1
-------------
(bugfix release, released on July 19, 2013)
- Fixed an issue where mtime was not always correctly restored.
Version 0.6
-----------

View file

@ -255,6 +255,7 @@ class Archive(object):
for id, chunk in zip_longest(ids, self.repository.get_many(ids, peek)):
data = self.key.decrypt(id, chunk)
fd.write(data)
fd.flush()
self.restore_attrs(path, item, fd=fd.fileno())
elif stat.S_ISFIFO(mode):
if not os.path.exists(os.path.dirname(path)):