Always write to temp file if compressing after

This commit is contained in:
Matt Nadareski
2024-07-16 15:14:59 -04:00
parent 41d8b4297e
commit b9817c9af5
3 changed files with 11 additions and 5 deletions

View File

@@ -428,7 +428,9 @@ namespace SabreTools.FileTypes.Archives
// If the archive doesn't exist, create it and put the single file
if (!File.Exists(archiveFileName))
{
inputStream.Seek(0, SeekOrigin.Begin);
if (inputStream.CanSeek)
inputStream.Seek(0, SeekOrigin.Begin);
zipReturn = zipFile.ZipFileCreate(tempFile);
// Open the input file for reading