Skip to content

Commit ded79a2

Browse files
committed
helper: Fix relative binary paths triggering PATH lookups
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
1 parent c7daf0c commit ded79a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helper/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ std::string GetPreload(std::string_view mode, std::string_view libdir) {
152152
bool LooksLikeElfFile(cstring_view target) {
153153
unique_fd target_fd;
154154

155-
if (target.starts_with("/")) {
155+
if (target.find("/") != cstring_view::npos) {
156156
target_fd = open(target.c_str(), O_RDONLY);
157157
if (target_fd.invalid()) {
158158
return false;

0 commit comments

Comments
 (0)