Skip to content

Commit

Permalink
fix(sourcebundles): Skip invalid sources (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex authored Aug 28, 2024
1 parent 7af6091 commit b9c8405
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Skip invalid sources ([#861](https://github.com/getsentry/symbolic/pull/861))

## 12.10.0

**Features**
Expand Down
7 changes: 6 additions & 1 deletion symbolic-debuginfo/src/sourcebundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,12 @@ where
info.set_ty(SourceFileType::Source);
info.set_path(filename.clone());

self.add_file(bundle_path, source, info)?;
if let Err(e) = self.add_file(bundle_path, source, info) {
// Skip sources that are not UTF-8
if e.kind != SourceBundleErrorKind::ReadFailed {
return Err(e);
};
}
}
}

Expand Down

0 comments on commit b9c8405

Please sign in to comment.