mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Fix new update pathway not actually being used
This commit is contained in:
parent
7f75184a01
commit
9173271900
@ -67,11 +67,15 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
Task.Factory.StartNew(async () =>
|
Task.Factory.StartNew(async () =>
|
||||||
{
|
{
|
||||||
// This gets scheduled back to the update thread, but we want the import to run in the background.
|
bool importSuccessful;
|
||||||
var imported = await importer.Import(notification, new ImportTask(filename)).ConfigureAwait(false);
|
|
||||||
|
if (originalModel != null)
|
||||||
|
importSuccessful = (await importer.ImportAsUpdate(notification, new ImportTask(filename), originalModel)) != null;
|
||||||
|
else
|
||||||
|
importSuccessful = (await importer.Import(notification, new ImportTask(filename))).Any();
|
||||||
|
|
||||||
// for now a failed import will be marked as a failed download for simplicity.
|
// for now a failed import will be marked as a failed download for simplicity.
|
||||||
if (!imported.Any())
|
if (!importSuccessful)
|
||||||
DownloadFailed?.Invoke(request);
|
DownloadFailed?.Invoke(request);
|
||||||
|
|
||||||
CurrentDownloads.Remove(request);
|
CurrentDownloads.Remove(request);
|
||||||
|
Loading…
Reference in New Issue
Block a user