From db0e9efe3107606dbcb3edfb3afc76a1b9a2c020 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 29 Apr 2024 18:51:31 +0200 Subject: [PATCH] Bugfix: reload was not working properly --- src/rdb/rdb/rdb.cc | 2 +- src/rdb/rdb/rdb.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rdb/rdb/rdb.cc b/src/rdb/rdb/rdb.cc index b1e41866c..64f8192f4 100644 --- a/src/rdb/rdb/rdb.cc +++ b/src/rdb/rdb/rdb.cc @@ -1762,7 +1762,7 @@ read_db_from_layout (rdb::Database *db, tl::InputStream &is) } void -Database::load (const std::string &fn) +Database::load (std::string fn) { tl::log << "Loading RDB from " << fn; diff --git a/src/rdb/rdb/rdb.h b/src/rdb/rdb/rdb.h index d368b5332..808af53ba 100644 --- a/src/rdb/rdb/rdb.h +++ b/src/rdb/rdb/rdb.h @@ -2455,8 +2455,10 @@ public: * @brief Load the database from a file * * Note: This clears the existing database. + * The argument intentionally is a copy, so we can call + * "load (this->filename ())" for reloading. */ - void load (const std::string &filename); + void load (std::string filename); /** * @brief Applies the attributes from a different database