| 95 | return s; |
| 96 | } |
| 97 | |
| 98 | std::string AbsoluteResolvedModPath(const std::filesystem::path& candidate) |
| 99 | { |
| 100 | std::error_code ec; |
| 101 | const std::string abs = std::filesystem::absolute(candidate, ec).string(); |
| 102 | |
| 103 | char real[1024]; |
| 104 | if (ResolveFilePath(abs.c_str(), real, sizeof(real)) && LooksLikeMod(real)) |
| 105 | return real; |
| 106 | |
| 107 | if (LooksLikeMod(abs)) |
| 108 | { |
| 109 | const std::filesystem::path canonical = std::filesystem::weakly_canonical(abs, ec); |
| 110 | return canonical.empty() ? abs : canonical.string(); |
| 111 | } |
| 112 | |
| 113 | return {}; |
| 114 | } |
| 115 | |
| 116 | std::string JoinCandidatesForError(const std::vector<std::filesystem::path>& candidates) |
no test coverage detected