Skip to content

Commit c8c029b

Browse files
[LevelDB] Do no crash if filesystem can't fsync
See bitcoin#10000
1 parent d40bc3f commit c8c029b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/env_posix.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class PosixWritableFile : public WritableFile {
231231
if (fd < 0) {
232232
s = IOError(dir, errno);
233233
} else {
234-
if (fsync(fd) < 0) {
234+
if (fsync(fd) < 0 && errno != EINVAL) {
235235
s = IOError(dir, errno);
236236
}
237237
close(fd);

0 commit comments

Comments
 (0)