aboutsummaryrefslogtreecommitdiff
path: root/bolt_unix.go
diff options
context:
space:
mode:
authorsasha-s <sasha@scaledinference.com>2015-05-14 15:43:13 -0700
committersasha-s <sasha@scaledinference.com>2015-05-14 15:43:13 -0700
commit019bf5b010caa9b546c17add2ddd68d58c58fc10 (patch)
tree19280f1ed9ab48dbf479f47c226274ae34541d3d /bolt_unix.go
parentMerge pull request #366 from benbjohnson/sync (diff)
downloaddedo-019bf5b010caa9b546c17add2ddd68d58c58fc10.tar.gz
dedo-019bf5b010caa9b546c17add2ddd68d58c58fc10.tar.xz
open read-only databases in read-only mode
Diffstat (limited to 'bolt_unix.go')
-rw-r--r--bolt_unix.go2
1 files changed, 1 insertions, 1 deletions
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 {