diff --git a/src/core/common/version.hpp b/src/core/common/version.hpp index cd51efd..e662e55 100644 --- a/src/core/common/version.hpp +++ b/src/core/common/version.hpp @@ -6,7 +6,7 @@ namespace clrsync::core { -const std::string GIT_SEMVER = "1.1.1+git.gf3e842d"; +const std::string GIT_SEMVER = "1.1.2+git.g25fbc78"; const std::string version_string(); } // namespace clrsync::core diff --git a/src/core/config/config.cpp b/src/core/config/config.cpp index 77a8fde..29f4c59 100644 --- a/src/core/config/config.cpp +++ b/src/core/config/config.cpp @@ -4,6 +4,7 @@ #include "core/io/toml_file.hpp" #include "core/palette/color.hpp" +#include #include #include @@ -68,6 +69,9 @@ Result config::initialize(std::unique_ptr file) std::filesystem::path config::get_user_config_dir() { + const char *xdg_config_home = std::getenv("XDG_CONFIG_HOME"); + if (xdg_config_home && xdg_config_home[0] != '\0') + return normalize_path(xdg_config_home) / "clrsync"; std::filesystem::path home = normalize_path("~"); return home / ".config" / "clrsync"; }