From 93df3fa1da6ffcc69a5b384ba04e3da7c5ef23ef Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 26 Apr 2021 19:25:28 +0200 Subject: [PATCH] Fix mismatching types in 2aadf52 #95 `wine_path` was a string, and `boost::process::search_path()` returns an `boost::filesystem::path`. We should just be using paths here anyways. --- src/plugin/utils.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp index 7735f1c3..1ff05bc3 100644 --- a/src/plugin/utils.cpp +++ b/src/plugin/utils.cpp @@ -343,14 +343,15 @@ std::vector get_augmented_search_path() { std::string get_wine_version() { // The '*.exe' scripts generated by winegcc allow you to override the binary - // used to run Wine, so will will respect this as well - std::string wine_path; + // used to run Wine, so will will handle this in the same way for our Wine + // version detection + fs::path wine_path; bp::environment env = boost::this_process::environment(); - const std::string wineloader_path = env["WINELOADER"].to_string(); - if (access(wineloader_path.c_str(), X_OK) == 0) { + if (const std::string wineloader_path = env["WINELOADER"].to_string(); + access(wineloader_path.c_str(), X_OK) == 0) { wine_path = wineloader_path; } else { - wine_path = bp::search_path("wine"); + wine_path = bp::search_path("wine").string(); } bp::ipstream output;