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

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="14A299l" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="14C78c" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1060" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="SBVideoViewController">
@@ -29,7 +29,7 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="1">
<rect key="frame" x="0.0" y="0.0" width="484" height="297"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -87,7 +87,7 @@
</textFieldCell>
</textField>
<button id="14">
<rect key="frame" x="166" y="178" width="137" height="18"/>
<rect key="frame" x="166" y="178" width="150" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Preserve Aspect Ratio" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="15">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+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;
}