]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
FileImportService fails to match file extensions 96/496/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Tue, 9 May 2017 12:58:57 +0000 (15:58 +0300)
committerJussi Koskela <jussi.koskela@semantum.fi>
Tue, 9 May 2017 12:58:57 +0000 (15:58 +0300)
Extensions always contain leading dot, so match accordingly. Remove
leading asterisk from candidates if one exists.

refs #7203

Change-Id: If8399760c70fcfc1f7822035fc971499621c72c7

bundles/org.simantics.fileimport/src/org/simantics/fileimport/FileImportService.java

index 15612d5fbd02905b8c2672d9621ad7d69dec719b..96276154237e11b31209dc1707c207edd68d8c71 100644 (file)
@@ -367,7 +367,7 @@ public class FileImportService {
 
     private static boolean isPerfectMatch(Set<String> candidates, String extension) {
         for (String ext : candidates) {
-            if (ext.startsWith("."))
+            if (ext.startsWith("*"))
                 ext = ext.substring(1);
             if (ext.equals(extension))
                 return true;