summaryrefslogtreecommitdiffstats
path: root/src/config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.cc')
-rw-r--r--src/config.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.cc b/src/config.cc
index 0b71440..586df33 100644
--- a/src/config.cc
+++ b/src/config.cc
@@ -100,6 +100,9 @@ namespace Astroid {
std_paths.cache_dir = path(cache) / path("astroid");
}
+ /* socket path */
+ std_paths.socket_dir = std_paths.cache_dir / path("socket");
+
/* default runtime */
char * runtime = getenv ("XDG_RUNTIME_HOME");
if (runtime == NULL) {
@@ -338,6 +341,11 @@ namespace Astroid {
create_directories (std_paths.runtime_dir);
}
+ if (!is_directory(std_paths.socket_dir)) {
+ LOG (warn) << "cf: making socket dir..";
+ create_directories (std_paths.socket_dir);
+ }
+
if (!is_regular_file (std_paths.config_file)) {
if (!initial) {
LOG (warn) << "cf: no config, using defaults.";