refactor: Integrate PlatformPaths for configuration directory management

- Replaced direct calls to GetConfigDirectory with PlatformPaths::GetConfigDirectory across multiple files to standardize configuration directory access.
- Updated RecentFilesManager, EditorManager, and various agent components to handle potential errors when retrieving the configuration directory.
- Enhanced file loading functions to utilize the new LoadFileFromConfigDir method for improved clarity and error handling.
- Introduced new methods in file_util.h for better file management practices, leveraging std::filesystem for cross-platform consistency.
This commit is contained in:
scawful
2025-10-08 20:50:49 -04:00
parent 9bc31bc8fc
commit 7f4a0f546c
14 changed files with 281 additions and 717 deletions

View File

@@ -344,7 +344,7 @@ void EditorSelectionDialog::MarkRecentlyUsed(EditorType type) {
void EditorSelectionDialog::LoadRecentEditors() {
try {
auto data = util::LoadConfigFile("recent_editors.txt");
auto data = util::LoadFileFromConfigDir("recent_editors.txt");
if (!data.empty()) {
std::istringstream ss(data);
std::string line;