Fix URL scheme handler to accept paths with spaces

This commit is contained in:
Eric Wing
2011-02-09 11:25:09 -08:00
committed by Bjorn Winckler
parent 1eee089039
commit 3d348a439e
+3
View File
@@ -1616,6 +1616,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
{
NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject]
stringValue];
// NOTE: URLWithString requires string to be percent escaped.
urlString = [urlString stringByAddingPercentEscapesUsingEncoding:
NSUTF8StringEncoding];
NSURL *url = [NSURL URLWithString:urlString];
// We try to be compatible with TextMate's URL scheme here, as documented