Skip to content

Commit

Permalink
Check exe OriginalFilename for 7zS.exe
Browse files Browse the repository at this point in the history
Resolves #542
  • Loading branch information
russellbanks committed Mar 24, 2024
1 parent d2be18a commit 4974ec8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/types/installer_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl InstallerType {
fn is_basic_installer(vs_version_info: Option<&VSVersionInfo>) -> bool {
const ORIGINAL_FILENAME: &str = "OriginalFilename";
const FILE_DESCRIPTION: &str = "FileDescription";
const BASIC_INSTALLER_KEYWORDS: [&str; 3] = ["installer", "setup", "7zs.sfx"];

vs_version_info
.and_then(|info| info.string_file_info.as_ref())
Expand All @@ -173,7 +174,11 @@ impl InstallerType {
value.make_ascii_lowercase();
value
})
.any(|value| value.contains("installer") || value.contains("setup"))
.any(|value| {
BASIC_INSTALLER_KEYWORDS
.iter()
.any(|keyword| value.contains(keyword))
})
})
})
}
Expand Down

0 comments on commit 4974ec8

Please sign in to comment.