-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Talking about ch24/iHotelApp/iHotelApp/ directory.
Since fileModificationDate is the date from the past it returns negative value when sent a message timeIntervalSinceNow. Return statement thus evaluates always to NO. I think return fabs(stalenessLevel) > kMenuStaleSeconds; should do the job.
AppCache.m:
+(BOOL) isMenuItemsStale
{
...
NSString *archivePath = [[AppCache cacheDirectory] stringByAppendingPathComponent:@"MenuItems.archive"];
NSTimeInterval stalenessLevel = [[[[NSFileManager defaultManager] attributesOfItemAtPath:archivePath error:nil] fileModificationDate] timeIntervalSinceNow];
return stalenessLevel > kMenuStaleSeconds;
}
@end
Metadata
Metadata
Assignees
Labels
No labels