mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Extensions
- The extensions directory is now created, if needed.
This commit is contained in:
parent
32e7af4610
commit
0caea22f08
2 changed files with 9 additions and 0 deletions
|
@ -48,6 +48,7 @@ Context::Context ()
|
|||
: program ("")
|
||||
, rc_file ()
|
||||
, data_dir ()
|
||||
, extension_dir ()
|
||||
, config ()
|
||||
, filter ()
|
||||
, sequence ()
|
||||
|
@ -589,6 +590,7 @@ void Context::determineDataLocation ()
|
|||
((*arg)[16] == ':' || (*arg)[16] == '='))
|
||||
{
|
||||
data_dir = Directory (arg->substr (17));
|
||||
extension_dir = data_dir.data + "/extensions";
|
||||
header ("Using alternate data.location " + data_dir.data); // TODO i18n
|
||||
break;
|
||||
}
|
||||
|
@ -614,6 +616,9 @@ void Context::createDefaultConfig ()
|
|||
|
||||
// Create data location, if necessary.
|
||||
config.createDefaultData (data_dir);
|
||||
|
||||
// Create extension directory, if necessary.
|
||||
extension_dir.create ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
#include <TDB2.h>
|
||||
#include <Hooks.h>
|
||||
#include <DOM.h>
|
||||
#include <Path.h>
|
||||
#include <File.h>
|
||||
#include <Directory.h>
|
||||
|
||||
class Context
|
||||
{
|
||||
|
@ -93,6 +96,7 @@ public:
|
|||
std::string home_dir;
|
||||
File rc_file;
|
||||
Path data_dir;
|
||||
Directory extension_dir;
|
||||
Config config;
|
||||
|
||||
Filter filter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue