X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FBackupFiles.java;h=71b31a705a4674433b09d66a617a644b164287f4;hb=3c2d7328e3d4d086c0649b88102de8da259ffb6c;hp=e913fbc3d4533af3dbdd83dcb4d1508e2c8b21d8;hpb=6db15a0553c0323a33121baad6d23ac9d8d4250b;p=jalview.git diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index e913fbc..71b31a7 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -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