mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 07:42:54 +08:00
make static name fix
This commit is contained in:
parent
78201c4649
commit
a20e2685be
@ -36,7 +36,7 @@ namespace osu.Game.Database
|
|||||||
public Action<Notification>? PostNotification { get; set; }
|
public Action<Notification>? PostNotification { get; set; }
|
||||||
|
|
||||||
// Store the model being exporting.
|
// Store the model being exporting.
|
||||||
private static readonly List<TModel> exportingModels = new List<TModel>();
|
private static readonly List<TModel> exporting_models = new List<TModel>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct exporter.
|
/// Construct exporter.
|
||||||
@ -63,14 +63,14 @@ namespace osu.Game.Database
|
|||||||
public async Task<bool> ExportAsync(TModel model, CancellationToken? cancellationToken = null)
|
public async Task<bool> ExportAsync(TModel model, CancellationToken? cancellationToken = null)
|
||||||
{
|
{
|
||||||
// check if the model is being exporting already
|
// check if the model is being exporting already
|
||||||
if (!exportingModels.Contains(model))
|
if (!exporting_models.Contains(model))
|
||||||
{
|
{
|
||||||
exportingModels.Add(model);
|
exporting_models.Add(model);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// model is being exported
|
// model is being exported
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string itemFilename = GetFilename(model).GetValidFilename();
|
string itemFilename = GetFilename(model).GetValidFilename();
|
||||||
@ -109,7 +109,7 @@ namespace osu.Game.Database
|
|||||||
exportStorage.Delete(filename);
|
exportStorage.Delete(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
exportingModels.Remove(model);
|
exporting_models.Remove(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
Loading…
Reference in New Issue
Block a user