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;