mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 13:37:46 +08:00
filename can be private
This commit is contained in:
parent
564f136945
commit
162f0bb95e
@ -34,7 +34,7 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
private readonly ProgressNotification notification;
|
private readonly ProgressNotification notification;
|
||||||
|
|
||||||
protected string Filename = null!;
|
private string filename = "";
|
||||||
|
|
||||||
private bool canCancel = true;
|
private bool canCancel = true;
|
||||||
|
|
||||||
@ -64,9 +64,9 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
if (item is TModel model)
|
if (item is TModel model)
|
||||||
{
|
{
|
||||||
Filename = $"{model.GetDisplayString().GetValidFilename()}{FileExtension}";
|
filename = $"{model.GetDisplayString().GetValidFilename()}{FileExtension}";
|
||||||
|
|
||||||
using (var stream = ExportStorage.CreateFileSafely(Filename))
|
using (var stream = ExportStorage.CreateFileSafely(filename))
|
||||||
{
|
{
|
||||||
await ExportToStreamAsync(model, stream);
|
await ExportToStreamAsync(model, stream);
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ namespace osu.Game.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
notification.CompletionText = "Export Complete, Click to open the folder";
|
notification.CompletionText = "Export Complete, Click to open the folder";
|
||||||
notification.CompletionClickAction += () => ExportStorage.PresentFileExternally(Filename);
|
notification.CompletionClickAction += () => ExportStorage.PresentFileExternally(filename);
|
||||||
notification.State = ProgressNotificationState.Completed;
|
notification.State = ProgressNotificationState.Completed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,6 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
ScoreInfo model = r.Find<ScoreInfo>(uuid.ID);
|
ScoreInfo model = r.Find<ScoreInfo>(uuid.ID);
|
||||||
|
|
||||||
Filename = $"{model.GetDisplayString().GetValidFilename()}{FileExtension}";
|
|
||||||
|
|
||||||
var file = model.Files.SingleOrDefault();
|
var file = model.Files.SingleOrDefault();
|
||||||
if (file == null)
|
if (file == null)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user