aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2025-01-20 11:44:34 -0800
committerMike Buland <mike@xagasoft.com>2025-01-20 11:44:34 -0800
commitb28a83c00503e0ac1c40c73dc093d8b0f164a6cc (patch)
tree3f3aff0b1075fe96be371f4a5fca2561ae780cd0
parent62d2e4e003a26550ebbe039c5d1e450841d8059f (diff)
downloadlibbu++-main.tar.gz
libbu++-main.tar.bz2
libbu++-main.tar.xz
libbu++-main.zip
Bu::MyriadCache was truncating existing dbs.HEADmain
When opening an existing database, while loading the index Bu::MyriadCache would open it with the WriteNew option, even though it didn't need to write. This now truncates the stream appropriately, so it never found any data and proceeded as though it was a new database.
-rw-r--r--src/unstable/myriadcache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h
index 289ab05..3629005 100644
--- a/src/unstable/myriadcache.h
+++ b/src/unstable/myriadcache.h
@@ -29,7 +29,7 @@ namespace Bu
29 { 29 {
30 Bu::ReadWriteMutex::ReadLocker l( rwStore ); 30 Bu::ReadWriteMutex::ReadLocker l( rwStore );
31 Bu::MyriadStream ms = mStore.open( 31 Bu::MyriadStream ms = mStore.open(
32 1, Bu::Myriad::WriteNew|Bu::Myriad::Read 32 1, Bu::Myriad::Read
33 ); 33 );
34 Bu::Archive ar( ms, Bu::Archive::load ); 34 Bu::Archive ar( ms, Bu::Archive::load );
35 uint8_t uVer; 35 uint8_t uVer;