Skip to content

Commit

Permalink
read recent items data more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfer committed Sep 14, 2015
1 parent 11109fa commit 112854d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Quicksilver/Code-QuickStepCore/QSObject_FileHandling.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
}
}
Expand Down

0 comments on commit 112854d

Please sign in to comment.