public static string LocalHostPathToFilePath(string localPath)
{
#if __MonoCS__
// The JSON format may use a string like this to reference a local path.
// Try it without the leading marker.
return localPath.Substring(10);
#else
// URL was something like /bloom///localhost/C$/, but info.LocalPathWithoutQuery uses Uri.LocalPath
// which for some reason drops the leading slashes for a network mapped drive.
// network mapped drives don't work if the computer isn't on a network.
// So we'll change the localhost\C$ to C: (same for other letters)
var pathArray = localPath.Substring(10).ToCharArray();
var drive = char.ToUpper(pathArray[0]);
if (pathArray[1] == '$' && pathArray[2] == '/' && drive >= 'A' && drive <= 'Z')
pathArray[1] = ':';
return new String(pathArray);
#endif
}