瀏覽代碼

[object_store] Flush before fsync when adding pack

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Earl Chew 7 年之前
父節點
當前提交
09ac55fec6
共有 1 個文件被更改,包括 1 次插入0 次删除
  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: