#include <cerrno>
#include <string>
+#include "stg/logger.h"
+#include "stg/dotconfpp.h"
#include "settings_impl.h"
-#include "stg_logger.h"
-#include "dotconfpp.h"
using namespace std;
SETTINGS_IMPL::SETTINGS_IMPL()
: strError(),
modulesPath("/usr/lib/stg"),
+ dirName(DIR_NUM),
confDir("/etc/stargazer"),
scriptsDir("/etc/stargazer"),
rules("/etc/stargazer/rules"),
SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd)
: strError(),
modulesPath("/usr/lib/stg"),
+ dirName(DIR_NUM),
confDir(cd),
scriptsDir(cd),
rules(cd + "/rules"),
SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval)
: strError(),
modulesPath(rval.modulesPath),
+ dirName(rval.dirName),
confDir(rval.confDir),
scriptsDir(rval.scriptsDir),
rules(rval.rules),
if (child)
{
const DOTCONFDocumentNode * dirNameNode;
+ dirName.reserve(DIR_NUM);
for (int i = 0; i < DIR_NUM; i++)
{
char strDirName[12];