mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add GetInfo tests
This commit is contained in:
@@ -43,8 +43,10 @@ namespace SabreTools.FileTypes
|
||||
/// <returns>Populated BaseFile object if success, empty on error</returns>
|
||||
public static BaseFile GetInfo(string input, HashType[] hashes, string? header)
|
||||
{
|
||||
// Add safeguard if file doesn't exist
|
||||
if (!File.Exists(input))
|
||||
// Add safeguard if file is invalid
|
||||
if (string.IsNullOrEmpty(input))
|
||||
return new BaseFile();
|
||||
else if (!File.Exists(input))
|
||||
return new BaseFile();
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user