JAL-3141 New layout and wording of Backups Preferences pane after consultation with...
[jalview.git] / src / jalview / io / BackupFiles.java
index e913fbc..71b31a7 100644 (file)
@@ -93,7 +93,7 @@ public class BackupFiles
   // REVERSE_ORDER
   public BackupFiles(File file)
   {
-    this(file, ".v" + NUM_PLACEHOLDER, false, 4, 3, false);
+    this(file, ".bak" + NUM_PLACEHOLDER, false, 3, 3, false);
   }
 
   public BackupFiles(File file, String defaultSuffix, boolean defaultNoMax,
@@ -208,15 +208,15 @@ public class BackupFiles
   public boolean rollBackupFiles()
   {
 
-    // file doesn't yet exist or backups are not enabled
-    if ((!file.exists()) || (!enabled) || (max < 0))
+    // file doesn't yet exist or backups are not enabled or template is null or
+    // empty
+    if ((!file.exists()) || (!enabled) || max < 0 || suffix == null
+            || suffix.length() == 0)
     {
       // nothing to do
       return true;
     }
 
-    // split filename up to insert suffix template in the right place. template
-    // and backupMax can be set in .jalview_properties
     String dir = "";
     File dirFile;
     try