Commit bc6033b
dzsekijo
Fix flush and fsync in xmp.py.
- Don't call file.flush() if file is not open for writing
(a fix for OS-es which adhere more to POSIX than Linux in this respect,
eg. *BSD).
- Do call file.flush() both from both of fsync and flush methods because data
is to be flushed out from userspace cache anyway before we can go on.1 parent a32dc39 commit bc6033b
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
| 188 | + | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
190 | | - | |
| 195 | + | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| |||
0 commit comments