Wait to clear db.path until just before db.close returns.

The Windows version of funlock needs the db.path to delete the
corresponding .lock file.
This commit is contained in:
Chris Hines 2016-04-06 20:38:51 -04:00
parent 831b652a7f
commit 5816124570

2
db.go
View File

@ -387,7 +387,6 @@ func (db *DB) close() error {
db.opened = false
db.freelist = nil
db.path = ""
// Clear ops.
db.ops.writeAt = nil
@ -414,6 +413,7 @@ func (db *DB) close() error {
db.file = nil
}
db.path = ""
return nil
}