Parcourir la source

[object_store] Flush before fsync when adding pack

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Earl Chew il y a 7 ans
Parent
commit
09ac55fec6
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      dulwich/object_store.py

+ 1 - 0
dulwich/object_store.py

@@ -695,6 +695,7 @@ class DiskObjectStore(PackBasedObjectStore):
         f = os.fdopen(fd, 'wb')
 
         def commit():
+            f.flush()
             os.fsync(fd)
             f.close()
             if os.path.getsize(path) > 0: