From 7120ba2dd9ef1afcabaf3e42d726c20876f01c37 Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Sun, 8 Feb 2015 18:15:42 -0800 Subject: [PATCH] Hopefully fixed the file tree crashing on startup if it was configured to an invalid path --- FileTree/FileTreeDataSource.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FileTree/FileTreeDataSource.m b/FileTree/FileTreeDataSource.m index 71d34df1b..9a4f1e668 100644 --- a/FileTree/FileTreeDataSource.m +++ b/FileTree/FileTreeDataSource.m @@ -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];