Add more paranoia in file size helper

This commit is contained in:
Matt Nadareski
2024-12-02 11:44:57 -05:00
parent 3141e1f020
commit 50bece6ac4

View File

@@ -20,7 +20,15 @@ namespace BinaryObjectScanner
if (!File.Exists(filename))
return -1;
return new FileInfo(filename).Length;
try
{
return new FileInfo(filename).Length;
}
catch
{
// Ignore errors
return -1;
}
}
/// <summary>