Skip to content

Commit

Permalink
compact: open src file readonly (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink authored Jan 29, 2022
1 parent f84fe98 commit 9b8a60d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bbolt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ func (cmd *CompactCommand) Run(args ...string) (err error) {
initialSize := fi.Size()

// Open source database.
src, err := bolt.Open(cmd.SrcPath, 0444, nil)
src, err := bolt.Open(cmd.SrcPath, 0444, &bolt.Options{ReadOnly: true})
if err != nil {
return err
}
Expand Down

0 comments on commit 9b8a60d

Please sign in to comment.