2 Commits

Author SHA1 Message Date
7638284616 fix: try $XDG_CONFIG_HOME first 2026-02-27 16:10:13 +03:00
25fbc7852d updated screenshot 2026-02-04 21:50:01 +03:00
3 changed files with 5 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 KiB

After

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -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

View File

@@ -4,6 +4,7 @@
#include "core/io/toml_file.hpp"
#include "core/palette/color.hpp"
#include <cstdlib>
#include <filesystem>
#include <fstream>
@@ -68,6 +69,9 @@ Result<void> config::initialize(std::unique_ptr<clrsync::core::io::file> 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";
}