mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2025-12-30 17:49:07 +00:00
Don't attempt to get the working directory of a URL
This commit is contained in:
parent
0aa4f06c39
commit
ee93890d86
@ -118,7 +118,12 @@ namespace proc {
|
||||
return boost::filesystem::path();
|
||||
}
|
||||
|
||||
BOOST_LOG(debug) << "Parsed executable ["sv << parts.at(0) << "] from command ["sv << cmd << ']';
|
||||
BOOST_LOG(debug) << "Parsed target ["sv << parts.at(0) << "] from command ["sv << cmd << ']';
|
||||
|
||||
// If the target is a URL, don't parse any further here
|
||||
if (parts.at(0).find("://") != std::string::npos) {
|
||||
return boost::filesystem::path();
|
||||
}
|
||||
|
||||
// If the cmd path is not an absolute path, resolve it using our PATH variable
|
||||
boost::filesystem::path cmd_path(parts.at(0));
|
||||
@ -130,7 +135,7 @@ namespace proc {
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_LOG(debug) << "Resolved executable ["sv << parts.at(0) << "] to path ["sv << cmd_path << ']';
|
||||
BOOST_LOG(debug) << "Resolved target ["sv << parts.at(0) << "] to path ["sv << cmd_path << ']';
|
||||
|
||||
// Now that we have a complete path, we can just use parent_path()
|
||||
return cmd_path.parent_path();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user