aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db.go')
-rw-r--r--db.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/db.go b/db.go
index 0bce184..ab7c5a1 100644
--- a/db.go
+++ b/db.go
@@ -432,7 +432,11 @@ func (db *DB) CopyFile(path string, mode os.FileMode) error {
}
defer f.Close()
- return db.Copy(f)
+ err = db.Copy(f)
+ if err != nil {
+ return err
+ }
+ return f.Close()
}
// Stat retrieves stats on the database and its page usage.