aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tx.go b/tx.go
index 823b06d..8791adf 100644
--- a/tx.go
+++ b/tx.go
@@ -240,7 +240,7 @@ func (tx *Tx) close() {
// Copy will write exactly tx.Size() bytes into the writer.
func (tx *Tx) Copy(w io.Writer) error {
// Open reader on the database.
- f, err := os.Open(tx.db.path)
+ f, err := os.OpenFile(tx.db.path, os.O_RDONLY|odirect, 0)
if err != nil {
_ = tx.Rollback()
return err