MacGDBp CHANGE LOG
================================================================================
+2.1.2
+---------------------
+- Fix: #267 Do not improperly double-escape file paths that contain %-encoded
+ characters (e.g. spaces).
+
+
2.1.1
---------------------
- Fix: Constrain the minimum size of the debugger split views, so that panes
}
+ (NSString*)escapedFilePathURI:(NSString*)path {
- // Custon GDBp paths are fine.
- if ([[path substringToIndex:4] isEqualToString:@"gdbp"])
+ // The backend will interpret this custom scheme.
+ if ([path hasPrefix:@"gdbp://"])
return path;
-
- // Create a temporary URL that will escape all the nasty characters.
- NSURL* url = [NSURL fileURLWithPath:path];
- NSString* urlString = [url absoluteString];
-
- // Remove the host because this is a file:// URL;
- NSString* host = [url host];
- if (host)
- urlString = [urlString stringByReplacingOccurrencesOfString:[url host] withString:@""];
-
- // Escape % for use in printf-style NSString formatters.
- urlString = [urlString stringByReplacingOccurrencesOfString:@"%" withString:@"%%"];
- return urlString;
+ return [[NSURL fileURLWithPath:path] absoluteString];
}
// MessageQueueDelegate ////////////////////////////////////////////////////////