Skip to content

Commit

Permalink
[LevelDB] Do no crash if filesystem can't fsync
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Mar 15, 2017
1 parent d40bc3f commit c8c029b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/env_posix.cc
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 c8c029b

Please sign in to comment.