diff --git a/leveldb/storage/file_storage_unix.go b/leveldb/storage/file_storage_unix.go
index <HASH>..<HASH> 100644
--- a/leveldb/storage/file_storage_unix.go
+++ b/leveldb/storage/file_storage_unix.go
@@ -67,9 +67,14 @@ func isErrInvalid(err error) bool {
 	if err == os.ErrInvalid {
 		return true
 	}
+	// Go < 1.8
 	if syserr, ok := err.(*os.SyscallError); ok && syserr.Err == syscall.EINVAL {
 		return true
 	}
+	// Go >= 1.8 returns *os.PathError instead
+	if patherr, ok := err.(*os.PathError); ok && patherr.Err == syscall.EINVAL {
+		return true
+	}
 	return false
 }
leveldb/storage: catch EINVAL on go >= <I> too (#<I>)

In go <I>, various functions were updated to return PathError instead.

This includes `os.File Sync()`.



For reference, the upstream commit which made this change is

<URL>