RecursiveExtractor icon indicating copy to clipboard operation
RecursiveExtractor copied to clipboard

Fail Faster in TarExtractor

Open gfs opened this issue 1 year ago • 0 comments

If the TarExtractor fails to open the entry stream for an entry or to copy that to a new backing stream it catches the exception but continues parsing anyway. This likely doesn't make sense as if the stream is in an indeterminate state there's not much meaningful data there. This exception should clean up the now unused backing stream, and continue enumeration rather than continuing to try to parse this entry - or at least return a failed entry object (with an empty Content stream?). Should also check if this pattern exists in the other collectors.

https://github.com/microsoft/RecursiveExtractor/blob/a73474937d42e669341946b92480140724d36883/RecursiveExtractor/Extractors/TarExtractor.cs#L127-L135

gfs avatar Apr 30 '24 20:04 gfs