Skip to content

Commit

Permalink
Fix failure to open locked DB in read-only mode on Windows (syndtr#316)
Browse files Browse the repository at this point in the history
Co-authored-by: Connor Edwards <[email protected]>
  • Loading branch information
cedws and cedws authored Aug 15, 2020
1 parent 42cf80b commit 3d1fae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leveldb/storage/file_storage_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newFileLock(path string, readOnly bool) (fl fileLock, err error) {
var access, shareMode uint32
if readOnly {
access = syscall.GENERIC_READ
shareMode = syscall.FILE_SHARE_READ
shareMode = syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE
} else {
access = syscall.GENERIC_READ | syscall.GENERIC_WRITE
}
Expand Down

0 comments on commit 3d1fae8

Please sign in to comment.