Catch errors when checking an AesXtsFile's size

This commit is contained in:
Alex Barney 2019-01-20 15:39:19 -06:00
parent 0ed67d87df
commit 39f952015f

View file

@ -43,6 +43,8 @@ namespace LibHac.IO
}
private long GetAesXtsFileSize(string path)
{
try
{
using (IFile file = BaseFileSystem.OpenFile(path, OpenMode.Read))
{
@ -55,5 +57,10 @@ namespace LibHac.IO
return BitConverter.ToInt32(buffer, 0);
}
}
catch (ArgumentOutOfRangeException)
{
return 0;
}
}
}
}