From 019bf5b010caa9b546c17add2ddd68d58c58fc10 Mon Sep 17 00:00:00 2001 From: sasha-s Date: Thu, 14 May 2015 15:43:13 -0700 Subject: open read-only databases in read-only mode --- bolt_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bolt_unix.go') diff --git a/bolt_unix.go b/bolt_unix.go index 35dce08..cc958d4 100644 --- a/bolt_unix.go +++ b/bolt_unix.go @@ -45,7 +45,7 @@ func mmap(db *DB, sz int) error { // Truncate and fsync to ensure file size metadata is flushed. // https://github.com/boltdb/bolt/issues/284 if !db.NoGrowSync { - if err := db.file.Truncate(int64(sz)); err != nil { + if err := db.ops.Truncate(int64(sz)); err != nil { return fmt.Errorf("file resize error: %s", err) } if err := db.file.Sync(); err != nil { -- cgit v1.2.3