From a30efc6cc708918ddb021f6f078f6ddd606a19f5 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 22 Jun 2017 10:20:54 -0400 Subject: [PATCH] (fix) check cache before using it (fixes #3988) --- SoObjects/SOGo/SOGoGCSFolder.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 48cea27be..6f0d66c17 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -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];