Skip to content

Commit

Permalink
Fix potential crash in skipped file extension tracking + file metadat…
Browse files Browse the repository at this point in the history
…a reading

Also turned back on a log message to help diagnose the issue.
  • Loading branch information
tattwamasi committed May 20, 2015
1 parent 0e11b6a commit 6b8822c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TeslaTunes/CopyConvertDirs.mm
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ - (NSURL *) processFileURL:(const NSURL *) file toDestination: destinationFile
}
outURL = destinationFile;
} else {
// NSLog(@"don't know what extension %@ is. Skipping", fileURL.pathExtension);
NSLog(@"don't know what extension \"%@\" is. Skipping", file.pathExtension? file.pathExtension: @"<no extension>");
// save extension to skipped set for stat purposes
[self.skippedExtensions addObject:file.pathExtension];
[self.skippedExtensions addObject:file.pathExtension? file.pathExtension : @"no extension"];
return nil;
}

Expand Down
1 change: 1 addition & 0 deletions TeslaTunes/flac_utils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ auto FlacMetadataFromMP4fileURL(const NSURL *mp4, std::vector<FLAC__StreamMetada
}
if (!f.file()) {
NSLog(@"Couldn't read extended tags from \"%s\".", mp4.fileSystemRepresentation);
return metadata.size();
}
auto props = f.file()->properties();
//NSLog(@"Properties in Apple Lossless file %s", mp4.fileSystemRepresentation);
Expand Down

0 comments on commit 6b8822c

Please sign in to comment.