mirror of https://github.com/etcd-io/bbolt.git
compact: open src file readonly (#292)
parent
f84fe98fde
commit
9b8a60db84
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue