Skip to content

Commit

Permalink
Merge bitcoin#16: [LevelDB] Do no crash if filesystem can't fsync
Browse files Browse the repository at this point in the history
c8c029b [LevelDB] Do no crash if filesystem can't fsync (Nicolas Dorier)

Tree-SHA512: 26657326cef26cac28401f0c770e201dcb65cd1cf867f3f6e2149999c96881d80604b90caf3506d8425c46ebc746716473d4a2e8ade8638a08e02d31f6184b48
  • Loading branch information
laanwj committed Mar 21, 2017
2 parents d40bc3f + c8c029b commit 0d969fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/env_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class PosixWritableFile : public WritableFile {
if (fd < 0) {
s = IOError(dir, errno);
} else {
if (fsync(fd) < 0) {
if (fsync(fd) < 0 && errno != EINVAL) {
s = IOError(dir, errno);
}
close(fd);
Expand Down

0 comments on commit 0d969fd

Please sign in to comment.