From c4139f4fe22080a222443b77856ee4e08af8f4f0 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 13 Jan 2017 22:25:40 +0100 Subject: [PATCH] BUG-2111: The where clause selecting the possible images didn't work correctly. --- GreenshotPlugin/Core/ClipboardHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GreenshotPlugin/Core/ClipboardHelper.cs b/GreenshotPlugin/Core/ClipboardHelper.cs index a2462708d..e46821b22 100644 --- a/GreenshotPlugin/Core/ClipboardHelper.cs +++ b/GreenshotPlugin/Core/ClipboardHelper.cs @@ -813,10 +813,10 @@ EndSelection:<<<<<<<4 string[] dropFileNames = (string[]) dataObject.GetData(DataFormats.FileDrop); if (dropFileNames != null && dropFileNames.Length > 0) { - return dropFileNames.Where(filename => !string.IsNullOrEmpty(filename)) + return dropFileNames + .Where(filename => !string.IsNullOrEmpty(filename)) .Where(Path.HasExtension) - .Select(filename => Path.GetExtension(filename).ToLowerInvariant()) - .Where(ext => ImageHelper.StreamConverters.Keys.Contains(ext)); + .Where(filename => ImageHelper.StreamConverters.Keys.Contains(Path.GetExtension(filename).ToLowerInvariant().Substring(1))); } return Enumerable.Empty(); }