(fix) check cache before using it (fixes #3988)

This commit is contained in:
Ludovic Marcotte
2017-06-22 10:20:54 -04:00
parent 31d131f4d3
commit a30efc6cc7

View File

@@ -447,7 +447,9 @@ static NSArray *childRecordFields = nil;
cache = [SOGoCache sharedCache];
record = [[cache valueForKey: _path] objectFromJSONString];
if (!record)
// We check if we got a cache miss or a potentially bogus
// entry from the cache
if (!record || ![record objectForKey: @"c_folder_type"])
{
record = [[self folderManager] recordAtPath: _path];