Make file opens safer and more consistent

This commit is contained in:
Matt Nadareski
2025-01-04 23:52:16 -05:00
parent 58a7558dd8
commit 281375f8e9
12 changed files with 96 additions and 49 deletions

View File

@@ -123,7 +123,7 @@ namespace SabreTools.FileTypes
/// <param name="hashes">Hashes to include in the information</param>
/// <param name="keepReadOpen">Indicates if the underlying read stream should be kept open</param>
/// <returns>Populated BaseFile object if success, empty one on error</returns>
public static BaseFile GetInfo(Stream? input, long size, HashType[]? hashes, bool keepReadOpen)
public static BaseFile GetInfo(Stream? input, long size, HashType[] hashes, bool keepReadOpen)
{
// If we have no stream
if (input == null)