mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 04:29:04 +03:00
fix: normalize paths
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "template_editor.hpp"
|
||||
#include "core/config/config.hpp"
|
||||
#include "core/theme/theme_template.hpp"
|
||||
#include "core/utils.hpp"
|
||||
#include "imgui.h"
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
@@ -420,7 +421,7 @@ void template_editor::save_template()
|
||||
|
||||
auto &cfg = clrsync::core::config::instance();
|
||||
|
||||
std::filesystem::path template_file = trimmed_input_path;
|
||||
std::filesystem::path template_file = clrsync::core::normalize_path(trimmed_input_path);
|
||||
|
||||
// Ensure the parent directory exists
|
||||
auto parent_dir = template_file.parent_path();
|
||||
|
||||
Reference in New Issue
Block a user