From 7e33a66f88f3a65467e849294202fdb273f45967 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 13 Nov 2024 15:58:51 +0000 Subject: [PATCH] JAL-4077 JAL-3921 match up transformed windows filepaths in Jmol's datamodel to original path in Jalview so associations work --- src/jalview/ext/jmol/JalviewJmolBinding.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 93a5633..99d369e 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -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); } -- 1.7.10.2