fix: normalize paths

This commit is contained in:
2025-12-17 02:58:23 +03:00
parent 1c2486d476
commit ef0854aa39
8 changed files with 38 additions and 26 deletions

View File

@@ -30,7 +30,8 @@ void palette_controller::select_palette(const std::string& name)
void palette_controller::create_palette(const std::string& name)
{
clrsync::core::palette new_palette = m_palette_manager.load_palette_from_file(clrsync::core::config::get_data_dir().string() + "/palettes/cursed.toml");
std::filesystem::path template_path = clrsync::core::config::get_data_dir() / "palettes" / "cursed.toml";
clrsync::core::palette new_palette = m_palette_manager.load_palette_from_file(template_path.string());
new_palette.set_name(name);
auto dir = clrsync::core::config::instance().palettes_path();