| 263 | } |
| 264 | |
| 265 | std::string joinPath(std::string const& directory, std::string const& filename) { |
| 266 | auto d = directory; |
| 267 | auto f = filename; |
| 268 | while (f.size() && (f[0] == '/' || f[0] == CANONICAL_PATH_SEPARATOR)) |
| 269 | f = f.substr(1); |
| 270 | while (d.size() && (d.back() == '/' || d.back() == CANONICAL_PATH_SEPARATOR)) |
| 271 | d = d.substr(0, d.size() - 1); |
| 272 | return d + CANONICAL_PATH_SEPARATOR + f; |
| 273 | } |
| 274 | |
| 275 | std::string cleanPath(std::string const& path) { |
| 276 | std::vector<std::string> finalParts; |
no test coverage detected