File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
DriveBackup/src/main/java/ratismal/drivebackup Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -570,10 +570,16 @@ public static String getBackupStatus() {
570570 return intl ("backup-status-not-running" );
571571 }
572572 BackupListEntry [] backupList = config .backupList .list ;
573- String backupSetName = backupList [backupBackingUp ].location .toString ();
573+ int backup = 0 ;
574+ //edge case when its in between backup steps where number is set to 0
575+ int backupNumber = Math .max (0 , backupBackingUp -1 );
576+ if (backupNumber <= backupList .length ) {
577+ backup = backupNumber ;
578+ }
579+ String backupSetName = backupList [backup ].location .toString ();
574580 return message
575581 .replace ("<set-name>" , backupSetName )
576- .replace ("<set-num>" , String .valueOf (backupBackingUp ))
582+ .replace ("<set-num>" , String .valueOf (backupNumber + 1 ))
577583 .replace ("<set-count>" , String .valueOf (backupList .length ));
578584 }
579585
You can’t perform that action at this time.
0 commit comments