You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log.Info($"Cleaning up old backup files... Found {backupFiles.Count} backups, keeping the most recent {maxBackupFiles}.");
317
+
318
+
while(backupFiles.Count>maxBackupFiles)
319
+
{
320
+
varfileToDelete=backupFiles.Last();
265
321
322
+
File.Delete(fileToDelete);
323
+
324
+
backupFiles.RemoveAt(backupFiles.Count-1);
325
+
326
+
Log.Info($"Backup deleted: {fileToDelete}");
327
+
}
328
+
}
329
+
330
+
/// <summary>
331
+
/// Creates a backup of the specified settings file in the given backup folder with the provided backup file name.
332
+
/// </summary>
333
+
/// <param name="setingsFilePath">The full path to the settings file to back up. Cannot be null or empty.</param>
334
+
/// <param name="backupFolderPath">The directory path where the backup file will be stored. If the directory does not exist, it will be created.</param>
335
+
/// <param name="backupFileName">The name to use for the backup file within the backup folder. Cannot be null or empty.</param>
0 commit comments