Skip to content

Commit

Permalink
core: fix inShellPath, Permission denied (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
v3llocet authored May 15, 2024
1 parent 1f228ba commit af7c87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/MiscFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool inShellPath(const std::string& exec) {
if (nextBegin < pathString.size())
paths.push_back(pathString.substr(nextBegin, pathString.size() - nextBegin));

return std::ranges::any_of(paths, [&exec](std::string& path) { return std::filesystem::exists(path + "/" + exec); });
return std::ranges::any_of(paths, [&exec](std::string& path) { return access((path + "/" + exec).c_str(), X_OK) == 0; });
}

void sendEmptyDbusMethodReply(sdbus::MethodCall& call, u_int32_t responseCode) {
Expand Down

0 comments on commit af7c87a

Please sign in to comment.