diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs
index b2921710a..f6712453f 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs
@@ -87,18 +87,18 @@ namespace Flow.Launcher.Plugin.Explorer.Helper
case ElementAlreadyExistsException:
api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_element_already_exists"), NewFileName));
break;
- case IOException iOException:
- if (iOException.Message.Contains("incorrect"))
+ default:
+ string msg = exception.Message;
+ if (!string.IsNullOrEmpty(msg))
{
- api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_invalid_name"), NewFileName));
+ api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_exception"), exception.Message));
return;
}
else
{
- goto default;
+ api.ShowMsgError(api.GetTranslation("plugin_explorer_no_reason_given_exception"));
}
- default:
- api.ShowMsgError(exception.ToString());
+
return;
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
index 959738d6b..a9e1eb69a 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
@@ -203,4 +203,6 @@
Successfully renamed it to: {0}
There is already a file with the name: {0} in this location
Failed to open rename dialog.
+ An error occured: {0}.
+ An error occured and no reason was given.