Hopefully fixed the file tree crashing on startup if it was configured to an invalid path

CQTexperiment
Chris Moeller 2015-02-08 18:15:42 -08:00
parent f55eb1d3bf
commit 7120ba2dd9
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@
- (void)setRootURL: (NSURL *)rootURL
{
if (![[NSFileManager defaultManager] fileExistsAtPath:[rootURL path]])
rootURL = [NSURL fileURLWithPath:[@"~/Music" stringByExpandingTildeInPath]];
[rootNode release];
rootNode = [[DirectoryNode alloc] initWithDataSource:self url:rootURL];