From: Jussi Koskela Date: Tue, 9 May 2017 12:58:57 +0000 (+0300) Subject: FileImportService fails to match file extensions X-Git-Tag: v1.29.0~68 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F496%2F1;p=simantics%2Fplatform.git 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 --- 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;