mirror of
https://github.com/ppy/osu
synced 2025-03-02 17:42:13 +00:00
Update usages of OpenInNativeExplorer to use ShowFileInNativeExplorer
Also updates WrappedStorage to override ShowFileInNativeExplorer.
This commit is contained in:
parent
e925c416cb
commit
25f172fae8
@ -462,10 +462,12 @@ namespace osu.Game.Database
|
||||
if (retrievedItem == null)
|
||||
throw new ArgumentException(@"Specified model could not be found", nameof(item));
|
||||
|
||||
using (var outputStream = exportStorage.GetStream($"{getValidFilename(item.ToString())}{HandledExtensions.First()}", FileAccess.Write, FileMode.Create))
|
||||
var filename = $"{getValidFilename(item.ToString())}{HandledExtensions.First()}";
|
||||
|
||||
using (var outputStream = exportStorage.GetStream(filename, FileAccess.Write, FileMode.Create))
|
||||
ExportModelTo(retrievedItem, outputStream);
|
||||
|
||||
exportStorage.OpenInNativeExplorer();
|
||||
exportStorage.ShowFileInNativeExplorer(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -135,7 +135,7 @@ namespace osu.Game.Graphics
|
||||
Text = $"{fileName} saved!",
|
||||
Activated = () =>
|
||||
{
|
||||
storage.OpenInNativeExplorer();
|
||||
storage.ShowFileInNativeExplorer(fileName);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
@ -72,6 +72,8 @@ namespace osu.Game.IO
|
||||
|
||||
public override void OpenPathInNativeExplorer(string path) => UnderlyingStorage.OpenPathInNativeExplorer(MutatePath(path));
|
||||
|
||||
public override void ShowFileInNativeExplorer(string filename) => UnderlyingStorage.ShowFileInNativeExplorer(MutatePath(filename));
|
||||
|
||||
public override Storage GetStorageForDirectory(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
|
@ -913,13 +913,15 @@ namespace osu.Game
|
||||
}
|
||||
else if (recentLogCount == short_term_display_limit)
|
||||
{
|
||||
var logFile = $@"{entry.Target.ToString().ToLowerInvariant()}.log";
|
||||
|
||||
Schedule(() => Notifications.Post(new SimpleNotification
|
||||
{
|
||||
Icon = FontAwesome.Solid.EllipsisH,
|
||||
Text = "Subsequent messages have been logged. Click to view log files.",
|
||||
Activated = () =>
|
||||
{
|
||||
Storage.GetStorageForDirectory("logs").OpenInNativeExplorer();
|
||||
Storage.GetStorageForDirectory(@"logs").ShowFileInNativeExplorer(logFile);
|
||||
return true;
|
||||
}
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user