mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 14:25:10 +08:00
Adjust code style slightly
This commit is contained in:
parent
b0c0c98c5d
commit
910c0022e3
@ -114,14 +114,25 @@ namespace osu.Game.Beatmaps
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (SqliteException sqliteException) when (sqliteException.SqliteErrorCode == 11 || sqliteException.SqliteErrorCode == 26) // SQLITE_CORRUPT, SQLITE_NOTADB
|
||||
catch (SqliteException sqliteException)
|
||||
{
|
||||
// only attempt purge & refetch if there is no other refetch in progress
|
||||
if (cacheDownloadRequest == null)
|
||||
// There have been cases where the user's local database is corrupt.
|
||||
// Let's attempt to identify these cases and re-initialise the local cache.
|
||||
switch (sqliteException.SqliteErrorCode)
|
||||
{
|
||||
tryPurgeCache();
|
||||
prepareLocalCache();
|
||||
case 26: // SQLITE_NOTADB
|
||||
case 11: // SQLITE_CORRUPT
|
||||
// only attempt purge & re-download if there is no other refetch in progress
|
||||
if (cacheDownloadRequest != null)
|
||||
throw;
|
||||
|
||||
tryPurgeCache();
|
||||
prepareLocalCache();
|
||||
onlineMetadata = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user