Compare commits
2 commits
8479e3fa16
...
9055bc45f3
Author | SHA1 | Date | |
---|---|---|---|
|
9055bc45f3 | ||
|
5667a4039d |
4 changed files with 15 additions and 2 deletions
|
@ -234,8 +234,15 @@ static BOOL consentLastEnabled = NO;
|
|||
[playlistLoader addDatabase];
|
||||
} else if([[NSFileManager defaultManager] fileExistsAtPath:[basePath stringByAppendingPathComponent:newFilename]]) {
|
||||
[playlistLoader addURL:[NSURL fileURLWithPath:[basePath stringByAppendingPathComponent:newFilename]]];
|
||||
} else {
|
||||
} else if([[NSFileManager defaultManager] fileExistsAtPath:[basePath stringByAppendingPathComponent:oldFilename]]){
|
||||
/* Without the above check, it appears the code was retrieving a nil NSURL from the nonexistent path
|
||||
* Then adding it to the playlist and crashing further down the line
|
||||
* Nobody on a new setup should be seeing this open anything, so it should fall through to the
|
||||
* notice below.
|
||||
*/
|
||||
[playlistLoader addURL:[NSURL fileURLWithPath:[basePath stringByAppendingPathComponent:oldFilename]]];
|
||||
} else {
|
||||
ALog(@"No playlist found, leaving it empty.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,14 @@
|
|||
}
|
||||
|
||||
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi {
|
||||
if(!url) {
|
||||
DLog(@"Player attempted to play invalid file...");
|
||||
return NO;
|
||||
}
|
||||
[self setStreamURL:url];
|
||||
[self setUserInfo:userInfo];
|
||||
|
||||
if (![self buildChain]) {
|
||||
if(![self buildChain]) {
|
||||
DLog(@"Couldn't build processing chain...");
|
||||
return NO;
|
||||
}
|
||||
|
|
|
@ -1112,6 +1112,7 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path);
|
|||
}
|
||||
|
||||
- (NSArray *)addURL:(NSURL *)url {
|
||||
if(!url) return [NSArray array];
|
||||
return [self insertURLs:@[url] atIndex:(int)[[playlistController content] count] sort:NO];
|
||||
}
|
||||
|
||||
|
|
|
@ -420,6 +420,7 @@ static inline void dispatch_async_reentrant(dispatch_queue_t queue, dispatch_blo
|
|||
}
|
||||
|
||||
- (const void *)beginFolderAccess:(NSURL *)fileUrl {
|
||||
if(!fileUrl) return NULL;
|
||||
NSURL *folderUrl = [SandboxBroker urlWithoutFragment:fileUrl];
|
||||
if(![folderUrl isFileURL]) return NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue