Fix .txt import not working.

This commit is contained in:
Damiano Galassi committed 2015-09-28 13:41:09 +02:00
1 parent 31280c4f41
commit b6c5407917
1 file changed
+7 -4
+7 -4
View File
@@ -768,13 +768,16 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
panel.canChooseDirectories = NO;
MP42ChapterTrack *chapters = self.mp4.chapters;
NSMutableArray<NSString *> *supportedFileFormats = [[MP42FileImporter supportedFileFormats] mutableCopy];
[supportedFileFormats addObject:@"txt"];
if (chapters) {
panel.allowedFileTypes = [[MP42FileImporter supportedFileFormats] arrayByAddingObject:@"csv"];
}
else {
panel.allowedFileTypes = [MP42FileImporter supportedFileFormats];
[supportedFileFormats addObject:@"csv"];
}
panel.allowedFileTypes = supportedFileFormats;
[panel beginSheetModalForWindow:documentWindow completionHandler:^(NSInteger result) {
if (result == NSFileHandlingPanelOKButton) {
NSString *fileExtension = panel.URLs.firstObject.pathExtension;