Bug Fix - .taskrc/.task

- Fixed bug whereby task created the default ~/.task directory,
  even if an extant .taskrc:data.location specified otherwise
  (thanks to Federico Hernandez).
This commit is contained in:
Paul Beckingham 2009-05-13 00:43:00 -04:00
parent ff14f0a28a
commit 362b4a5bc9
3 changed files with 7 additions and 0 deletions

View file

@ -33,6 +33,8 @@
+ Applied patch to fix a UUID bug on Solaris 8 (thanks to Steven de Brouwer). + Applied patch to fix a UUID bug on Solaris 8 (thanks to Steven de Brouwer).
+ The task man page is now installed. Try "man task" (thanks to Federico + The task man page is now installed. Try "man task" (thanks to Federico
Hernandez and P.C. Shyamshankar). Hernandez and P.C. Shyamshankar).
+ Fixed bug that causes task to create a default .task directory, even if
.taskrc:data.location specified otherwise (thanks to Federico Hernandez).
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -174,6 +174,8 @@
<li>Applied patch to fix a UUID bug on Solaris 8 (thanks to Steven de Brouwer). <li>Applied patch to fix a UUID bug on Solaris 8 (thanks to Steven de Brouwer).
<li>The task man page is now installed. Try "man task" (thanks to Federico <li>The task man page is now installed. Try "man task" (thanks to Federico
Hernandez and P.C. Shyamshankar). Hernandez and P.C. Shyamshankar).
<li>Fixed bug that causes task to create a default .task directory, even if
.taskrc:data.location specified otherwise (thanks to Federico Hernandez).
</ul> </ul>
<p> <p>

View file

@ -219,6 +219,9 @@ void Config::createDefault (const std::string& home)
this->load (rcFile); this->load (rcFile);
// Get the data.location value from the (potentially newly created) .taskrc
// file.
dataDir = this->get ("data.location", dataDir);
if (-1 == access (dataDir.c_str (), F_OK)) if (-1 == access (dataDir.c_str (), F_OK))
mkdir (dataDir.c_str (), S_IRWXU); mkdir (dataDir.c_str (), S_IRWXU);
} }