mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Add more paranoia in file size helper
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user