From b67741078b02dacf82211880e81506cc726e1dfd Mon Sep 17 00:00:00 2001 From: Wolfgang Lux Date: Wed, 9 Aug 2017 14:34:00 +0200 Subject: [PATCH] Fix bug where archiving was no longer run every day --- ChangeLog | 8 +++++++- EcProcess.m | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89527fb..9cfe780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ +2017-08-09 Wolfgang Lux + + * EcProcess.m(ecNewDay:): + Fix bug where archiving was no longer run every day unless some + defaults had been changed locally. + 2017-06-23 Richard Frith-Macdonald * EcCommand.m: * EcControl.m: * EcProcess.h: * EcProcess.m: - Replace cmdArchive: with ecArchive: changing trhe log file archiving + Replace cmdArchive: with ecArchive: changing the log file archiving model to archive files primarily based on their last modification date. Fixes the bug where files were archived to a folder with the wrong date on startup, and simplifies archiving code generally. diff --git a/EcProcess.m b/EcProcess.m index 143c49d..7a389da 100644 --- a/EcProcess.m +++ b/EcProcess.m @@ -2343,17 +2343,17 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval); static NSDictionary *defs = nil; NSDictionary *d = [cmdDefs volatileDomainForName: @"EcCommand"]; + /* Archive previous day's logs. Force logs to be archived for the + * specified date even if they have been modified today (on the basis + * that only the very latest info in them should be from today). + */ + NSLog(@"%@", [self ecArchive: when]); + if (nil != defs) { NSEnumerator *e; NSString *k; - /* Archive previous day's logs. Force logs to be archived for the - * specified date even if they have been modified today (on the basis - * that only the very latest info in them should be from today). - */ - NSLog(@"%@", [self ecArchive: when]); - /* Check information left in the EcCommand domain. */ e = [[d allKeys] objectEnumerator];