- Fixed bug so that task now recreates (with permission) any missing ~/.taskrc, and recreates any missing ~/.task

This commit is contained in:
Paul Beckingham
2008-06-21 17:12:04 -04:00
parent ceaba87ba3
commit 06a85c24ad
3 changed files with 37 additions and 45 deletions

View File

@@ -242,10 +242,9 @@ int main (int argc, char** argv)
if (!pw)
throw std::string ("Could not read home directory from passwd file.");
// Create a default config file and data directory if necessary.
std::string home = pw->pw_dir;
home += "/.taskrc";
if (!conf.load (home))
conf.createDefault (home);
conf.createDefault (home);
TDB tdb;
tdb.dataDirectory (conf.get ("data.location"));