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.
This commit is contained in:
Robbert van der Helm
2021-04-26 19:25:28 +02:00
parent 2aadf5256b
commit 93df3fa1da
+6 -5
View File
@@ -343,14 +343,15 @@ std::vector<boost::filesystem::path> 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;