Fixed handling of relative paths in configuration files (#69)

This commit is contained in:
Bartek Kryza
2023-01-21 18:00:21 +01:00
parent b3701fa810
commit 78cfa630e5
99 changed files with 221 additions and 207 deletions

View File

@@ -250,4 +250,17 @@ std::size_t hash_seed(std::size_t seed);
*/
std::string path_to_url(const std::filesystem::path &p);
/**
* @brief Ensure path is absolute.
*
* If path is absolute, return the p. If path is not absolute, make it
* absolute with respect to root directory.
*
* @param p Path to modify
* @param root Root against which the path should be made absolute
* @return Absolute path
*/
std::filesystem::path ensure_path_is_absolute(const std::filesystem::path &p,
const std::filesystem::path &root = std::filesystem::current_path());
} // namespace clanguml::util