1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 10:22:56 +08:00

Use HResult

This commit is contained in:
Dean Herbert 2018-10-31 17:07:05 +09:00
parent 29a1d092fa
commit 9aa88293e2

View File

@ -36,8 +36,15 @@ namespace osu.Game.Utils
if (exception != null)
{
if (exception is IOException ioe && ioe.Message.StartsWith("There is not enough space on the disk"))
return;
if (exception is IOException ioe)
{
// disk full exceptions, see https://stackoverflow.com/a/9294382
const int hr_error_handle_disk_full = unchecked((int)0x80070027);
const int hr_error_disk_full = unchecked((int)0x80070070);
if (ioe.HResult == hr_error_handle_disk_full || ioe.HResult == hr_error_disk_full)
return;
}
// since we let unhandled exceptions go ignored at times, we want to ensure they don't get submitted on subsequent reports.
if (lastException != null &&