From 4881fb88d55e80473a6f3117b0d0b8265a3b66b2 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Tue, 9 May 2017 15:58:57 +0300 Subject: [PATCH] FileImportService fails to match file extensions Extensions always contain leading dot, so match accordingly. Remove leading asterisk from candidates if one exists. refs #7203 Change-Id: If8399760c70fcfc1f7822035fc971499621c72c7 --- .../src/org/simantics/fileimport/FileImportService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.simantics.fileimport/src/org/simantics/fileimport/FileImportService.java b/bundles/org.simantics.fileimport/src/org/simantics/fileimport/FileImportService.java index 15612d5fb..962761542 100644 --- a/bundles/org.simantics.fileimport/src/org/simantics/fileimport/FileImportService.java +++ b/bundles/org.simantics.fileimport/src/org/simantics/fileimport/FileImportService.java @@ -367,7 +367,7 @@ public class FileImportService { private static boolean isPerfectMatch(Set candidates, String extension) { for (String ext : candidates) { - if (ext.startsWith(".")) + if (ext.startsWith("*")) ext = ext.substring(1); if (ext.equals(extension)) return true; -- 2.47.1