From 4c0b75237fd608107cfff54e904f1b424564617e Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 21 Dec 2010 11:23:55 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20issue=20form=20redirecting=20output?= =?UTF-8?q?=20actions=20via=20exit=20codes=20if=20Bundle's=20default=20out?= =?UTF-8?q?put=20action=20was=20None=20=E2=80=A2=20renamed=20constants=20t?= =?UTF-8?q?o=20avoid=20confusing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/SPAppController.m') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index a974ebf1..cbadfb85 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -825,7 +825,9 @@ [[NSFileManager defaultManager] removeItemAtPath:bundleInputFilePath error:nil]; - NSString *action = [[cmdData objectForKey:SPBundleFileOutputActionKey] lowercaseString]; + NSString *action = SPBundleOutputActionNone; + if([cmdData objectForKey:SPBundleFileOutputActionKey] && [[cmdData objectForKey:SPBundleFileOutputActionKey] length]) + action = [[cmdData objectForKey:SPBundleFileOutputActionKey] lowercaseString]; // Redirect due exit code if(err != nil) { @@ -864,8 +866,7 @@ } if(err == nil && output) { - if([cmdData objectForKey:SPBundleFileOutputActionKey] && [[cmdData objectForKey:SPBundleFileOutputActionKey] length] - && ![[cmdData objectForKey:SPBundleFileOutputActionKey] isEqualToString:SPBundleOutputActionNone]) { + if(![action isEqualToString:SPBundleOutputActionNone]) { NSPoint pos = [NSEvent mouseLocation]; pos.y -= 16; -- cgit v1.2.3