Author: rfm
Date: Sun Jun 14 09:10:35 2015
New Revision: 38633
URL: http://svn.gna.org/viewcvs/gnustep?rev=38633&view=rev
Log:
fixup log compression lost in change of debug logs dir
Modified:
libs/ec/trunk/EcCommand.m
Modified: libs/ec/trunk/EcCommand.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcCommand.m?rev=38633&r1=38632&r2=38633&view=diff
==============================================================================
--- libs/ec/trunk/EcCommand.m (original)
+++ libs/ec/trunk/EcCommand.m Sun Jun 14 09:10:35 2015
@@ -2466,12 +2466,7 @@
return AUTORELEASE(gone);
}
-/* Perform this one in another thread.
- * The sweep operation may compress really large logfiles and could be
- * very slow, so it's performed in a separate thread to avoid blocking
- * normal operations.
- */
-- (void) sweep: (NSCalendarDate*)when
+- (void) _sweep: (NSString*)logs at: (NSCalendarDate*)when
{
NSInteger compressAfter;
NSInteger deleteAfter;
@@ -2480,21 +2475,11 @@
NSTimeInterval now;
NSTimeInterval ti;
NSFileManager *mgr;
- NSString *logs;
NSString *file;
NSAutoreleasePool *arp;
arp = [NSAutoreleasePool new];
- if (nil == when)
- {
- now = [NSDate timeIntervalSinceReferenceDate];
- }
- else
- {
- now = [when timeIntervalSinceReferenceDate];
- }
-
- logs = [[self ecUserDirectory] stringByAppendingPathComponent: @"Logs"];
+ now = [when timeIntervalSinceReferenceDate];
/* get number of days after which to do log compression/deletion.
*/
@@ -2642,6 +2627,25 @@
sweeping = NO;
}
+/* Perform this one in another thread.
+ * The sweep operation may compress really large logfiles and could be
+ * very slow, so it's performed in a separate thread to avoid blocking
+ * normal operations.
+ */
+- (void) sweep: (NSCalendarDate*)when
+{
+ NSString *logs;
+
+ if (nil == when)
+ {
+ when = [NSDate date];
+ }
+ logs = [[self ecUserDirectory] stringByAppendingPathComponent: @"DebugLogs"];
+ [self _sweep: logs at: when];
+ logs = [[self ecUserDirectory] stringByAppendingPathComponent: @"Logs"];
+ [self _sweep: logs at: when];
+}
+
- (void) ecNewHour: (NSCalendarDate*)when
{
if (sweeping == YES)
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs