File tree 1 file changed +5
-10
lines changed
1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -1752,31 +1752,26 @@ - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
1752
1752
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
1753
1753
f = [f stringByRemovingPercentEncoding ];
1754
1754
#else
1755
- f = [f stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
1755
+ f = [f stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
1756
1756
#endif
1757
1757
1758
1758
// parse value
1759
1759
NSString *v = [arr objectAtIndex: 1 ];
1760
1760
1761
- // do not decode url, since it's a file URI
1762
- BOOL decode = ![f isEqualToString: @" url" ];
1763
- if (decode)
1764
- {
1765
1761
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
1766
- v = [f stringByRemovingPercentEncoding ];
1762
+ v = [v stringByRemovingPercentEncoding ];
1767
1763
#else
1768
- v = [f stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
1764
+ v = [v stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
1769
1765
#endif
1770
- }
1771
1766
1772
- [dict setValue: v forKey: f];
1767
+ [dict setValue: v forKey: f];
1773
1768
}
1774
1769
}
1775
1770
1776
1771
// Actually open the file.
1777
1772
NSString *file = [dict objectForKey: @" url" ];
1778
1773
if (file != nil ) {
1779
- NSURL *fileUrl= [NSURL URLWithString: file];
1774
+ NSURL *fileUrl = [NSURL URLWithString: file];
1780
1775
// TextMate only opens files that already exist.
1781
1776
if ([fileUrl isFileURL ]
1782
1777
&& [[NSFileManager defaultManager ] fileExistsAtPath:
You can’t perform that action at this time.
0 commit comments