JAL-4077 JAL-3921 match up transformed windows filepaths in Jmol's datamodel to origi...
authorJim Procter <jprocter@dundee.ac.uk>
Wed, 13 Nov 2024 15:58:51 +0000 (15:58 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Wed, 13 Nov 2024 15:58:51 +0000 (15:58 +0000)
src/jalview/ext/jmol/JalviewJmolBinding.java

index 93a5633..99d369e 100644 (file)
@@ -785,8 +785,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
         }
         else
         {
-          File fl = new File(getPdbEntry(pe).getFile());
-          matches = fl.equals(new File(fileName));
+          String jvPdbFile = getPdbEntry(pe).getFile();
+          File fl = new File(jvPdbFile);
+          matches = fl.equals(new File(fileName)) || JmolCommands.filePathMatch(fileName, jvPdbFile);
           if (matches)
           {
             foundEntry = true;
@@ -1089,7 +1090,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     }
     for (int i = 0; i < modelFileNames.length; i++)
     {
-      if (modelFileNames[i].equalsIgnoreCase(pdbFile))
+      if (JmolCommands.filePathMatch(modelFileNames[i],pdbFile))
       {
         return String.valueOf(i + 1);
       }