Fix ShouldOnlyShowUsersLevels test

This commit is contained in:
jvyden 2021-11-18 19:34:28 -05:00
commit 249b1d582c
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -78,7 +78,17 @@ namespace LBPUnion.ProjectLighthouse.Helpers
public static bool ResourceExists(string hash) => File.Exists(GetResourcePath(hash));
public static int ResourceSize(string hash) => (int)new FileInfo(GetResourcePath(hash)).Length;
public static int ResourceSize(string hash)
{
try
{
return (int)new FileInfo(GetResourcePath(hash)).Length;
}
catch
{
return 0;
}
}
public static void EnsureDirectoryCreated(string path)
{