139 {
140 namespace fs = std::filesystem;
141 auto normalized = std::string(filepath);
142 std::ranges::replace(normalized, '\\', '/');
143 if (fs::path(normalized).is_absolute())
144 return normalized;
145 if (fs::exists(normalized))
146 return normalized;
147 auto from_cwd = fs::current_path() / normalized;
148 if (fs::exists(from_cwd))
149 return from_cwd.string();
151 if (fs::exists(from_root))
152 return from_root.string();
153 return normalized;
154 }
std::string project_root()