JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / io / BackupFilenameParts.java
index 1504404..4f93ece 100644 (file)
@@ -1,5 +1,7 @@
 package jalview.io;
 
+import jalview.bin.Cache;
+
 import java.io.File;
 
 public class BackupFilenameParts
@@ -111,9 +113,7 @@ public class BackupFilenameParts
           String filename, String base, boolean extensionMatch)
   {
     BackupFilenameParts bfp = new BackupFilenameParts();
-    BackupFilesPresetEntry bfpe = BackupFilesPresetEntry
-            .getSavedBackupEntry();
-    String template = bfpe.suffix;
+    String template = Cache.getDefault(BackupFiles.SUFFIX, null);
     if (template == null)
     {
       return bfp;
@@ -121,7 +121,8 @@ public class BackupFilenameParts
     int digits;
     try
     {
-      digits = bfpe.digits;
+      digits = Integer
+              .parseInt(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, null));
     } catch (Exception e)
     {
       return bfp;