Skip to content

Commit

Permalink
Clean up 7z SFX extraction method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRogueArchivist committed Sep 26, 2024
1 parent 1a3d933 commit 055bf61
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions BinaryObjectScanner/Packer/SevenZipSFX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,12 @@ public class SevenZipSFX : IExtractablePortableExecutable, IPortableExecutableCh

/// <inheritdoc/>
public string? Extract(string file, PortableExecutable pex, bool includeDebug)
=> Extract(file, includeDebug);

/// <inheritdoc/>
public string? Extract(string file, bool includeDebug)
{
if (!File.Exists(file))
return null;

using var fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
return Extract(fs, file, includeDebug);
}
using var stream = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

/// <inheritdoc/>
public string? Extract(Stream? stream, string file, bool includeDebug)
{
if (stream == null)
return null;

Expand Down

0 comments on commit 055bf61

Please sign in to comment.