Browse Source

[object_store] Flush before fsync when adding pack

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Earl Chew 7 years ago
parent
commit
09ac55fec6
1 changed files with 1 additions and 0 deletions
  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: