diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-01-10 19:09:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 18:09:40 +0000 |
| commit | b5fb6110ab1f75440b4b90d09f95d304d8c2080b (patch) | |
| tree | dd1d01b42da490b8e0925b1d913744739d79f9a8 /src/helpers/MiscFunctions.cpp | |
| parent | da9252a23e69fc4d34beca73ebcc90b03af0ed2a (diff) | |
core: Add a periodic donation request (#8981)
Will fire once in december and july. Disableable with `ecosystem:no_donation:nag`
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index e970b781..08a1106a 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -911,30 +911,3 @@ float stringToPercentage(const std::string& VALUE, const float REL) { else return std::stof(VALUE); } - -bool executableExistsInPath(const std::string& exe) { - if (!getenv("PATH")) - return false; - - static CVarList paths(getenv("PATH"), 0, ':', true); - - for (auto& p : paths) { - std::string path = p + std::string{"/"} + exe; - std::error_code ec; - if (!std::filesystem::exists(path, ec) || ec) - continue; - - if (!std::filesystem::is_regular_file(path, ec) || ec) - continue; - - auto stat = std::filesystem::status(path, ec); - if (ec) - continue; - - auto perms = stat.permissions(); - - return std::filesystem::perms::none != (perms & std::filesystem::perms::others_exec); - } - - return false; -} |
