Skip to content
Browse files

allow for identifiers that contain `:`

  • Loading branch information...
1 parent 6f58c1f commit 049e36e271332ce88be3199739c436c8f1036545 @skurfer committed Jun 6, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 Quicksilver/Code-QuickStepCore/QSObject_Pasteboard.m
View
7 Quicksilver/Code-QuickStepCore/QSObject_Pasteboard.m
@@ -47,9 +47,10 @@ + (id)objectWithPasteboard:(NSPasteboard *)pasteboard {
theObject = [QSObject objectWithIdentifier:[pasteboard stringForType:@"QSObjectID"]];
if (!theObject && [[pasteboard types] containsObject:@"QSObjectAddress"]) {
- NSArray *objectIdentifier = [[pasteboard stringForType:@"QSObjectAddress"] componentsSeparatedByString:@":"];
- if ([[objectIdentifier objectAtIndex:0] intValue] == [[NSProcessInfo processInfo] processIdentifier])
- return [QSObject objectWithIdentifier:[objectIdentifier lastObject]];
+ NSString *objectIdentifier = [pasteboard stringForType:@"QSObjectAddress"];
+ NSUInteger firstColon = [objectIdentifier rangeOfString:@":"].location;
+ if ([[objectIdentifier substringToIndex:firstColon] intValue] == [[NSProcessInfo processInfo] processIdentifier])
+ return [QSObject objectWithIdentifier:[objectIdentifier substringFromIndex:firstColon + 1]];
#ifdef DEBUG
else if (VERBOSE)
NSLog(@"Ignored old object: %@", objectIdentifier);

0 comments on commit 049e36e

Please sign in to comment.
Something went wrong with that request. Please try again.