1
0
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:
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; 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;
} }
} }

View File

@ -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;