mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 03:49:44 -04:00
refactor(universal): simplify looks_like_executable
This commit is contained in:
parent
9a736f2ab2
commit
7aded55c09
@ -52,19 +52,12 @@ constexpr dwarfs::sorted_array_map functions{
|
||||
};
|
||||
|
||||
bool looks_like_executable(std::filesystem::path const& path) {
|
||||
auto ext = path.extension().string();
|
||||
|
||||
if (ext.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
auto const ext = path.extension().string();
|
||||
return ext.empty()
|
||||
#ifdef _WIN32
|
||||
if (ext == ".exe") {
|
||||
return true;
|
||||
}
|
||||
|| ext == ".exe"
|
||||
#endif
|
||||
|
||||
return false;
|
||||
;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user