Skip non-existing recent projects

Long-term it would make sense to also delete them if they haven’t been used for e.g. a month.
This commit is contained in:
Allan Odgaard
2014-02-10 13:53:10 +07:00
parent d52eda852e
commit d9f0cf6563

View File

@@ -133,8 +133,11 @@ static NSUInteger const kOakSourceIndexFavorites = 1;
favorites.clear();
for(id pair in [[self sharedProjectStateDB] allObjects])
{
std::string const path = to_s((NSString*)pair[@"key"]);
favorites.emplace(path::name(path), path);
if(access([pair[@"key"] fileSystemRepresentation], F_OK) == 0)
{
std::string const path = to_s((NSString*)pair[@"key"]);
favorites.emplace(path::name(path), path);
}
}
}
else if(_sourceIndex == kOakSourceIndexFavorites)