Start scanning from the user's Documents directory instead of its home directory on iOS.

Should fix issues where scanning for disc images can take a long time.
This commit is contained in:
Jean-Philip Desjardins 2016-05-01 16:58:55 -04:00
parent 754fe909da
commit bf293a69b7
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ static CollectionView *instance = nil;
- (NSArray *) buildCollection
{
NSString* path = [@"~" stringByExpandingTildeInPath];
NSString* path = [@"~/Documents" stringByExpandingTildeInPath];
NSFileManager* localFileManager = [[NSFileManager alloc] init];
NSDirectoryEnumerator* dirEnum = [localFileManager enumeratorAtPath: path];

View File

@ -133,7 +133,7 @@ static NSString * const reuseIdentifier = @"coverCell";
if ([segue.identifier isEqualToString:@"showEmulator"]) {
NSIndexPath* indexPath = [[self.collectionView indexPathsForSelectedItems] objectAtIndex:0];
NSString* filePath = [[self.coverView.diskImages objectAtIndex: indexPath.row] objectForKey:@"file"];
NSString* homeDirPath = [@"~" stringByExpandingTildeInPath];
NSString* homeDirPath = [@"~/Documents" stringByExpandingTildeInPath];
NSString* absolutePath = [homeDirPath stringByAppendingPathComponent: filePath];
EmulatorViewController* emulatorViewController = segue.destinationViewController;
emulatorViewController.imagePath = absolutePath;