CopyToStream needs some work

This commit is contained in:
Matt Nadareski
2024-07-15 21:34:17 -04:00
parent a2e10f789b
commit e29610de4b
13 changed files with 35 additions and 32 deletions

View File

@@ -158,9 +158,9 @@ namespace SabreTools.FileTypes.Archives
public override string? CopyToFile(string entryName, string outDir)
{
// Try to extract a stream using the given information
(MemoryStream? ms, string? realEntry) = CopyToStream(entryName);
(Stream? ms, string? realEntry) = CopyToStream(entryName);
// If the memory stream and the entry name are both non-null, we write to file
// If the stream and the entry name are both non-null, we write to file
if (ms != null && realEntry != null)
{
realEntry = Path.Combine(outDir, realEntry);
@@ -196,9 +196,9 @@ namespace SabreTools.FileTypes.Archives
}
/// <inheritdoc/>
public override (MemoryStream?, string?) CopyToStream(string entryName)
public override (Stream?, string?) CopyToStream(string entryName)
{
MemoryStream? ms = new();
var ms = new MemoryStream();
string? realEntry = null;
try