Browse Source

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

Jonas Borgström 12 years ago
parent
commit
576daaf38b
2 changed files with 9 additions and 0 deletions
  1. 8 0
      CHANGES
  2. 1 0
      attic/archive.py

+ 8 - 0
CHANGES

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

+ 1 - 0
attic/archive.py

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