diff --git a/src/StructuredLogViewer/MainWindow.xaml.cs b/src/StructuredLogViewer/MainWindow.xaml.cs index 6e1cdb61..6f2b4289 100644 --- a/src/StructuredLogViewer/MainWindow.xaml.cs +++ b/src/StructuredLogViewer/MainWindow.xaml.cs @@ -183,6 +183,11 @@ private bool TryOpenFromClipboard() text = text.TrimStart('"').TrimEnd('"'); + if (!text.EndsWith(".binlog", StringComparison.OrdinalIgnoreCase)) + { + return false; + } + // only open a file from clipboard if it's not listed in the recent files var recentFiles = new HashSet(StringComparer.OrdinalIgnoreCase); recentFiles.UnionWith(SettingsService.GetRecentLogFiles());