@@ -312,12 +312,18 @@ Public Class BackupHelper
312
312
Dim SavegamesList As String () = Directory.GetFiles(BackupDir, "*.save" )
313
313
If SavegamesList.Length > 0 Then
314
314
'If a subdirectory contains save files add it to the list and to the backup restore dialog's dropdown menu
315
- 'Also append their creation date and time, and if a backup was created less than 1 hour ago display "Created X minutes ago" instead
316
315
BackupDirs.Add(BackupDir)
317
- CustomMsgBox.BackupDirsDropdownCombo.Items.Add(BackupDir.Substring(BackupDir.LastIndexOf(Path.DirectorySeparatorChar) + 1 ) & Localization.GetString( "msgbox_dropdown_backup_timestamp_created" ) &
318
- If (Directory.GetCreationTime(BackupDir) > Now.AddHours(- 1 ),
319
- Regex.Replace(Now.Subtract(Directory.GetCreationTime(BackupDir)).ToString( "mm" ) & Localization.GetString( "msgbox_dropdown_backup_timestamp" ), "^[0-9]{2}\ [a-z\ ]+$" , Localization.GetString( "msgbox_dropdown_backup_timestamp_00" )),
320
- Directory.GetCreationTime(BackupDir).ToString( "F" , CultureInfo.CurrentUICulture)))
316
+ 'Append backup creation timestamp
317
+ 'If it's been created less than an hour ago, append "Created XX minutes ago" and if it's been created less than a minute ago replace "00 minutes ago" with "Less than a minute ago"
318
+ CustomMsgBox.BackupDirsDropdownCombo.Items.Add(
319
+ BackupDir.Substring(BackupDir.LastIndexOf(Path.DirectorySeparatorChar) + 1 ) &
320
+ Localization.GetString( "msgbox_dropdown_backup_timestamp_created" ) &
321
+ If (
322
+ Directory.GetCreationTime(BackupDir) > Now.AddHours(- 1 ),
323
+ Regex.Replace(Now.Subtract(Directory.GetCreationTime(BackupDir)).ToString( "mm" ) & Localization.GetString( "msgbox_dropdown_backup_timestamp" ), "^[0-9]{2}\ [a-z\ ]+$" , Localization.GetString( "msgbox_dropdown_backup_timestamp_00" )),
324
+ Directory.GetCreationTime(BackupDir).ToString( "F" , CultureInfo.CurrentUICulture)
325
+ )
326
+ )
321
327
End If
322
328
Next
323
329
0 commit comments