Use Boost.Filesystem for the configuration

I'd much rather just use std::filesystem, but since all of
Boost.Process, Boost.DLL Boost.Asio uses its own filesystem library we
need to use it anyways.
This commit is contained in:
Robbert van der Helm
2020-05-15 14:54:42 +02:00
parent d9ff98de84
commit f96c08775a
2 changed files with 11 additions and 14 deletions
+5 -8
View File
@@ -55,16 +55,13 @@ std::string create_logger_prefix(const fs::path& socket_path) {
}
std::optional<fs::path> find_wineprefix() {
// We need these string conversions because Boost still doesn't use
// std::filesystem paths
std::optional<std::filesystem::path> dosdevices_dir =
find_dominating_file("dosdevices", find_vst_plugin().string(),
std::filesystem::is_directory);
if (dosdevices_dir.has_value()) {
return dosdevices_dir->parent_path().string();
std::optional<fs::path> dosdevices_dir =
find_dominating_file("dosdevices", find_vst_plugin(), fs::is_directory);
if (!dosdevices_dir.has_value()) {
return std::nullopt;
}
return std::nullopt;
return dosdevices_dir->parent_path();
}
PluginArchitecture find_vst_architecture(fs::path plugin_path) {