From 47d3cfb140a384cc42e929308c40cc6f2d270494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Tue, 20 Oct 2015 15:35:54 +0200 Subject: [PATCH] Begin simplify of paths --- src/singletons.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/singletons.cc b/src/singletons.cc index 1a032f6..7f07185 100644 --- a/src/singletons.cc +++ b/src/singletons.cc @@ -55,12 +55,8 @@ boost::filesystem::path Singleton::create_config_path(const std::string &subfold return home; } -boost::filesystem::path Singleton::config_dir() { return create_config_path(".juci/config"); } -boost::filesystem::path Singleton::log_dir() { return create_config_path(".juci/log"); } -boost::filesystem::path Singleton::style_dir() { return create_config_path(".juci/styles"); } -std::string Singleton::config_json() { - auto conf_dir = Singleton::config_dir(); - conf_dir /= "config.json"; // to ensure correct paths on windows - return conf_dir.string(); -} +boost::filesystem::path Singleton::config_dir() { return create_config_path({".juci", "config"}); } +boost::filesystem::path Singleton::log_dir() { return create_config_path({".juci", "log"}); } +boost::filesystem::path Singleton::style_dir() { return create_config_path({".juci", "styles"}); } +std::string Singleton::config_json() { return (Singleton::config_dir()/"config.json").string(); }