From 2e74c19d188d2b9b17baed375a2250ee0abc53f5 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 15 Mar 2011 22:51:44 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20issue=20for=20handleEventWithURL:?= =?UTF-8?q?=20to=20ignore=20trailing=20/=20while=20parameter=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 30429d79..7ab59084 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -653,7 +653,11 @@ YY_BUFFER_STATE yy_scan_string (const char *); NSString *command = [url host]; NSString *passedProcessID = [url user]; NSArray *parameter; - NSArray *pathComponents = [[url absoluteString] pathComponents]; + NSArray *pathComponents; + if([[url absoluteString] hasSuffix:@"/"]) + pathComponents = [[[url absoluteString] substringToIndex:[[url absoluteString] length]-1] pathComponents]; + else + pathComponents = [[url absoluteString] pathComponents]; if([pathComponents count] > 2) parameter = [pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count]-2)]; -- cgit v1.2.3