Friends :)

This commit is contained in:
shweet committed 2026-05-22 08:15:16 -04:00
1 parent 1bc5199e3b
commit b1c9d38ef5
21 files changed
+87950 -30586

No files matched your search

+13
View File
@@ -100,12 +100,25 @@ namespace anm2ed::util::path
std::filesystem::path make_relative(const std::filesystem::path& path)
{
if (path.empty()) return path;
if (!path.is_absolute()) return path;
std::error_code ec{};
auto relative = std::filesystem::relative(path, ec);
if (!ec) return relative;
return path;
}
std::filesystem::path make_relative(const std::filesystem::path& path, const std::filesystem::path& base)
{
if (path.empty()) return path;
if (base.empty() || !path.is_absolute()) return path;
std::error_code ec{};
auto relative = std::filesystem::relative(path, base, ec);
if (!ec) return relative;
return path;
}
std::filesystem::path lower_case_backslash_handle(const std::filesystem::path& path)
{
auto newPath = path;
+1
View File
@@ -10,6 +10,7 @@ namespace anm2ed::util::path
std::string to_utf8(const std::filesystem::path&);
std::filesystem::path from_utf8(const std::string&);
std::filesystem::path make_relative(const std::filesystem::path&);
std::filesystem::path make_relative(const std::filesystem::path&, const std::filesystem::path&);
bool is_exist(const std::filesystem::path&);
bool is_executable(const std::filesystem::path&);