1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 12:32:58 +08:00

filename can be private

This commit is contained in:
cdwcgt 2022-11-21 19:05:26 +09:00
parent 564f136945
commit 162f0bb95e
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2
2 changed files with 4 additions and 6 deletions

View File

@ -34,7 +34,7 @@ namespace osu.Game.Database
private readonly ProgressNotification notification;
protected string Filename = null!;
private string filename = "";
private bool canCancel = true;
@ -64,9 +64,9 @@ namespace osu.Game.Database
{
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);
}
@ -130,7 +130,7 @@ namespace osu.Game.Database
}
notification.CompletionText = "Export Complete, Click to open the folder";
notification.CompletionClickAction += () => ExportStorage.PresentFileExternally(Filename);
notification.CompletionClickAction += () => ExportStorage.PresentFileExternally(filename);
notification.State = ProgressNotificationState.Completed;
}
}

View File

@ -28,8 +28,6 @@ namespace osu.Game.Database
{
ScoreInfo model = r.Find<ScoreInfo>(uuid.ID);
Filename = $"{model.GetDisplayString().GetValidFilename()}{FileExtension}";
var file = model.Files.SingleOrDefault();
if (file == null)
return;