Skip to content

Commit

Permalink
Ignore error if exe doesn't contain RT_VERSION
Browse files Browse the repository at this point in the history
Resolves #421
  • Loading branch information
russellbanks committed Jan 30, 2024
1 parent c554269 commit 910615c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/file_analyser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ impl<'a> FileAnalyser<'a> {
msi = Some(extract_msi(&pe_file)?);
}
pe_arch = Some(Architecture::get_from_exe(&pe_file)?);
string_map = VSVersionInfo::parse(&pe_file, map.as_ref())?
.string_file_info
string_map = VSVersionInfo::parse(&pe_file, map.as_ref())
.ok()
.and_then(|vs_version_info| vs_version_info.string_file_info)
.map(|mut string_file_info| {
string_file_info.children.swap_remove(0).string_map()
});
Expand All @@ -102,8 +103,9 @@ impl<'a> FileAnalyser<'a> {
msi = Some(extract_msi(&pe_file)?);
}
pe_arch = Some(Architecture::get_from_exe(&pe_file)?);
string_map = VSVersionInfo::parse(&pe_file, map.as_ref())?
.string_file_info
string_map = VSVersionInfo::parse(&pe_file, map.as_ref())
.ok()
.and_then(|vs_version_info| vs_version_info.string_file_info)
.map(|mut string_file_info| {
string_file_info.children.swap_remove(0).string_map()
});
Expand Down

0 comments on commit 910615c

Please sign in to comment.