Route dialog work directory picker through platform services

This commit is contained in:
2026-06-04 18:14:02 +02:00
parent 52cf7628da
commit b1acd5118b
11 changed files with 164 additions and 78 deletions

View File

@@ -449,6 +449,24 @@ public:
invoke_selected_path(path, callback);
}
[[nodiscard]] bool supports_working_directory_picker() override
{
return true;
}
[[nodiscard]] std::string format_working_directory_path(std::string_view path) override
{
char path_buffer[MAX_PATH] = {};
const auto length = GetFullPathNameA(
std::string(path).c_str(),
static_cast<DWORD>(sizeof(path_buffer)),
path_buffer,
nullptr);
if (length > 0 && length < sizeof(path_buffer))
return path_buffer;
return std::string(path);
}
[[nodiscard]] bool uses_prepared_file_writes() override
{
return false;