mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Rules: All unpersistent local settings are now named 'temp.db', 'temp.shiny'
This commit is contained in:
parent
fa1863d032
commit
b099944a3c
3 changed files with 9 additions and 9 deletions
|
@ -157,15 +157,15 @@ int CmdDiagnostics (Rules& rules, Database& database, Extensions& extensions, Lo
|
|||
<< (env ? env : "-")
|
||||
<< "\n";
|
||||
|
||||
File cfg (rules.get ("db") + "/timewarrior.cfg");
|
||||
File cfg (rules.get ("temp.db") + "/timewarrior.cfg");
|
||||
out << " Cfg: " << describeFile (cfg) << "\n";
|
||||
|
||||
Directory db (rules.get ("db"));
|
||||
Directory db (rules.get ("temp.db"));
|
||||
out << " Database: " << describeFile (db) << "\n";
|
||||
|
||||
for (auto& file : database.files ())
|
||||
{
|
||||
File df (rules.get ("db") + "/data");
|
||||
File df (rules.get ("temp.db") + "/data");
|
||||
df += file;
|
||||
out << " " << describeFile (df) << "\n";
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ int CmdDiagnostics (Rules& rules, Database& database, Extensions& extensions, Lo
|
|||
out << "\n";
|
||||
|
||||
// Display extensions.
|
||||
Directory extDir (rules.get ("db"));
|
||||
Directory extDir (rules.get ("temp.db"));
|
||||
extDir += "extensions";
|
||||
|
||||
out << "Extensions\n"
|
||||
|
|
|
@ -60,7 +60,7 @@ int CmdExtensions (Rules& rules, Extensions& extensions)
|
|||
t.set (row, 1, perms);
|
||||
}
|
||||
|
||||
Directory extDir (rules.get ("db"));
|
||||
Directory extDir (rules.get ("temp.db"));
|
||||
extDir += "extensions";
|
||||
|
||||
std::cout << "\n"
|
||||
|
|
|
@ -126,12 +126,12 @@ void initializeDataAndRules (
|
|||
// This value is not written out to disk, as there would be no point. Having
|
||||
// located the config file, the 'db' location is already known. This is just
|
||||
// for subsequent internal use.
|
||||
rules.set ("db", dbLocation._data);
|
||||
log.write ("debug", std::string (" rc.db=") + rules.get ("db"));
|
||||
rules.set ("temp.db", dbLocation._data);
|
||||
log.write ("debug", std::string (" rc.db=") + rules.get ("temp.db"));
|
||||
|
||||
// Perhaps some subsequent code would like to know this is a new db and
|
||||
// possibly a first run.
|
||||
rules.set ("shiny", (shinyNewDatabase ? 1 : 0));
|
||||
rules.set ("temp.shiny", (shinyNewDatabase ? 1 : 0));
|
||||
|
||||
// Initialize the database (no data read), but files are enumerated.
|
||||
database.initialize (data._data);
|
||||
|
@ -148,7 +148,7 @@ void initializeExtensions (
|
|||
Extensions& extensions,
|
||||
Log& log)
|
||||
{
|
||||
Directory extDir (rules.get ("db"));
|
||||
Directory extDir (rules.get ("temp.db"));
|
||||
extDir += "extensions";
|
||||
|
||||
extensions.initialize (extDir._data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue