mirror of
https://github.com/ppy/osu
synced 2025-02-18 19:36:58 +00:00
comment
This commit is contained in:
parent
2a6ea99e6a
commit
8446e7d841
@ -74,7 +74,7 @@ namespace osu.Game.Database
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
// outputStream may close before writing when request cancel
|
||||
// outputStream may close before writing when request cancel.
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Database
|
||||
|
||||
public Action<Notification>? PostNotification { get; set; }
|
||||
|
||||
// Store the model being exported.
|
||||
// Store the model being exporting.
|
||||
private readonly List<TModel> exportingModels = new List<TModel>();
|
||||
|
||||
/// <summary>
|
||||
@ -62,6 +62,7 @@ namespace osu.Game.Database
|
||||
/// <returns></returns>
|
||||
public async Task ExportAsync(TModel model, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
// check if the model is being exporting already
|
||||
if (!exportingModels.Contains(model))
|
||||
{
|
||||
exportingModels.Add(model);
|
||||
@ -105,6 +106,7 @@ namespace osu.Game.Database
|
||||
}
|
||||
finally
|
||||
{
|
||||
// cleanup if export is failed or canceled.
|
||||
if (!success)
|
||||
{
|
||||
exportStorage.Delete(filename);
|
||||
|
Loading…
Reference in New Issue
Block a user