JAL-2195 bug fix to enable restoring jmol session save on Windows on OSX
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 13 Sep 2016 09:51:27 +0000 (10:51 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 13 Sep 2016 09:51:27 +0000 (10:51 +0100)
src/jalview/gui/Jalview2XML.java

index a9ff3b8..7093a9a 100644 (file)
@@ -4009,6 +4009,12 @@ public class Jalview2XML
         // filename
         // translation differently.
         StructureData filedat = oldFiles.get(new File(oldfilenam));
+          if (filedat == null)
+          {
+            String reformatedOldFilename = oldfilenam.replaceAll("/",
+                    "\\\\");
+            filedat = oldFiles.get(new File(reformatedOldFilename));
+        }
         newFileLoc.append(Platform.escapeString(filedat.getFilePath()));
         pdbfilenames.add(filedat.getFilePath());
         pdbids.add(filedat.getPdbId());