Return NO in updateMP4FileWithAttributes:attributes:error: only if a serious error happened like a permission error or the mp4 not closing properly. Print the other errors to the log.

This commit is contained in:
Damiano Galassi committed 2014-12-14 09:23:18 +01:00
1 parent 5219a73a7a
commit 6bc3b03923
2 files changed
+16 -16

No files matched your search

+11 -11
View File
@@ -98,10 +98,10 @@
if (absoluteURL) {
self.mp4 = [[[MP42File alloc] initWithExistingFile:absoluteURL andDelegate:self] autorelease];
if (self.mp4) {
[fileTracksTable reloadData];
[self tableViewSelectionDidChange:nil];
} else {
[fileTracksTable reloadData];
[self tableViewSelectionDidChange:nil];
if (!self.mp4) {
[self close];
}
}
@@ -144,10 +144,16 @@
- (BOOL)saveDidComplete:(NSError **)outError URL:(NSURL *)absoluteURL
{
[NSApp endSheet: savingWindow];
[NSApp endSheet:savingWindow];
[savingWindow orderOut:self];
[optBar stopAnimation:self];
if (*outError && [*outError code] == 101) {
// Write permission error, don't reload the file
} else {
[self reloadFile:absoluteURL];
}
if (*outError) {
[self presentError:*outError
modalForWindow:documentWindow
@@ -158,12 +164,6 @@
[*outError release];
}
if (*outError && [*outError code] == 101) {
// Write persmission error, don't reload the file
} else {
[self reloadFile:absoluteURL];
}
return YES;
}