From 112854d6b91221b6cf5b733f988a568253ef6393 Mon Sep 17 00:00:00 2001 From: Rob McBroom Date: Mon, 14 Sep 2015 18:48:52 -0400 Subject: [PATCH] read recent items data more reliably --- .../Code-QuickStepCore/QSObject_FileHandling.m | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Quicksilver/Code-QuickStepCore/QSObject_FileHandling.m b/Quicksilver/Code-QuickStepCore/QSObject_FileHandling.m index a77833456..f58313903 100644 --- a/Quicksilver/Code-QuickStepCore/QSObject_FileHandling.m +++ b/Quicksilver/Code-QuickStepCore/QSObject_FileHandling.m @@ -39,13 +39,12 @@ NSString *sflPath = [NSString stringWithFormat:pSharedFileListPathTemplate, bundleIdentifier]; NSString *sflStandardized = [sflPath stringByStandardizingPath]; if ([[NSFileManager defaultManager] fileExistsAtPath:sflStandardized isDirectory:nil]) { - NSDictionary *sflData = [NSDictionary dictionaryWithContentsOfFile:sflStandardized]; - for (id obj in sflData[@"$objects"]) { - if ([obj isKindOfClass:[NSString class]]) { - url = [NSURL URLWithString:obj]; - if ([url isFileURL]) { - [documentsArray addObject:[url path]]; - } + NSDictionary *sflData = [NSKeyedUnarchiver unarchiveObjectWithFile:sflStandardized]; + for (id item in sflData[@"items"]) { + // item's class is SFLListItem + url = [item URL]; + if ([url isFileURL]) { + [documentsArray addObject:[url path]]; } } }