mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
init: Database is initialized
This commit is contained in:
parent
3fa5eb4bf8
commit
d8befa209e
2 changed files with 8 additions and 6 deletions
10
src/init.cpp
10
src/init.cpp
|
@ -101,16 +101,18 @@ void initializeData (Configuration& configuration, Database& database)
|
|||
configuration.set ("db", dbLocation._data);
|
||||
std::cout << "# rc.db=" << configuration.get ("db") << "\n";
|
||||
|
||||
// Perhaps some later code would like to know this is a new db.
|
||||
configuration.set ("shiny", 1);
|
||||
// Perhaps some subsequent code would like to know this is a new db and
|
||||
// possibly a first run.
|
||||
configuration.set ("shiny", (shinyNewDatabase ? 1 : 0));
|
||||
|
||||
// TODO Init database (no data read).
|
||||
// Initialize the database (no data read), but files are enumerated.
|
||||
database.initialize (dbLocation._data);
|
||||
|
||||
std::cout << "# Configuration\n";
|
||||
for (const auto& name : configuration.all ())
|
||||
std::cout << "# " << name << "=" << configuration[name] << "\n";
|
||||
|
||||
std::cout << "# " << database.dump ();
|
||||
std::cout << database.dump ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue