This commit is contained in:
@@ -171,16 +171,16 @@ namespace AyaNova.Util
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get date of newest backup file or minvalue if not found
|
||||
/// Get date of newest automatic backup file or minvalue if not found
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal static DateTime MostRecentBackupFileDate()
|
||||
internal static DateTime MostRecentAutomatedBackupFileDate()
|
||||
{
|
||||
DateTime LastBackup = DateTime.MinValue;
|
||||
var BackupPath = UtilityFilesFolder;
|
||||
foreach (string file in Directory.EnumerateFiles(UtilityFilesFolder, "*.backup"))
|
||||
{
|
||||
foreach (string file in Directory.EnumerateFiles(UtilityFilesFolder, "db-*.backup"))
|
||||
{
|
||||
var ThisFileTime = File.GetCreationTimeUtc(file);
|
||||
if (ThisFileTime > LastBackup)
|
||||
{
|
||||
@@ -505,11 +505,11 @@ namespace AyaNova.Util
|
||||
}
|
||||
|
||||
|
||||
internal static void BackupAttachments(ILogger log = null)
|
||||
internal static void BackupAttachments(string demandFileNamePrepend,ILogger log = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var AttachmentsBackupFile = $"at-{FileUtil.GetSafeDateFileName()}.zip";//presentation issue so don't use UTC for this one
|
||||
var AttachmentsBackupFile = $"{demandFileNamePrepend}at-{FileUtil.GetSafeDateFileName()}.zip";//presentation issue so don't use UTC for this one
|
||||
AttachmentsBackupFile = GetFullPathForUtilityFile(AttachmentsBackupFile);
|
||||
|
||||
System.IO.Compression.ZipFile.CreateFromDirectory(UserFilesFolder, AttachmentsBackupFile);
|
||||
|
||||
Reference in New Issue
Block a user