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

This commit is contained in:
Chris Moeller 2015-02-08 18:15:42 -08:00
parent f55eb1d3bf
commit 7120ba2dd9

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];