| 89 | } |
| 90 | |
| 91 | Result<Uri> ParseFileSystemUri(const std::string& uri_string) { |
| 92 | Uri uri; |
| 93 | auto status = uri.Parse(uri_string); |
| 94 | if (!status.ok()) { |
| 95 | #ifdef _WIN32 |
| 96 | // Could be a "file:..." URI with backslashes instead of regular slashes. |
| 97 | RETURN_NOT_OK(uri.Parse(ToSlashes(uri_string))); |
| 98 | if (uri.scheme() != "file") { |
| 99 | return status; |
| 100 | } |
| 101 | #else |
| 102 | return status; |
| 103 | #endif |
| 104 | } |
| 105 | return uri; |
| 106 | } |
| 107 | |
| 108 | #ifdef _WIN32 |
| 109 | static bool IsDriveLetter(char c) { |