Flush files before fsync'ing
This commit is contained in:
parent
21f5f5d70b
commit
ed6335aa15
@ -771,6 +771,7 @@ class Collection(BaseCollection):
|
|||||||
newline=newline, encoding=None if "b" in mode else self._encoding)
|
newline=newline, encoding=None if "b" in mode else self._encoding)
|
||||||
try:
|
try:
|
||||||
yield tmp
|
yield tmp
|
||||||
|
tmp.flush()
|
||||||
try:
|
try:
|
||||||
self._fsync(tmp.fileno())
|
self._fsync(tmp.fileno())
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user