From 518f883f71238cf1173470f2eed31b4377b6adac Mon Sep 17 00:00:00 2001 From: Koisu Date: Tue, 24 Jun 2025 10:44:06 -0700 Subject: [PATCH] Changed RenameDialog to modal and added exception logging --- Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index 04caecc8e..afd42c8d7 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -101,7 +101,18 @@ namespace Flow.Launcher.Plugin.Explorer } public void RenameDialog(FileSystemInfo info, IPublicAPI api) { - new RenameFile(api, info).Show(); + if (info == null) throw new ArgumentNullException(nameof(info)); + if (api == null) throw new ArgumentNullException(nameof(api)); + + try + { + new RenameFile(api, info).ShowDialog(); + } + catch (Exception ex) + { + api.ShowMsgError(api.GetTranslation("errorTitle"), api.GetTranslation("plugin_explorer_failed_to_open_rename_dialog")); + api.LogException(nameof(Main), $"Failed to open rename dialog: {ex.Message}", ex, nameof(RenameDialog)); + } } private void FillQuickAccessLinkNames() {