Various fixes for mwcc/mwld (#32)

* Override GetFileAttributesA for MWCC license.dat

* Add WIN_FUNC to FileTimeToLocalFileTime

* Use callee_pop_aggregate_return(0)

* Lexically normalize paths
This commit is contained in:
2023-01-23 15:22:50 -05:00
committed by GitHub
parent 6b6a462ea1
commit 7d08a2bdca
4 changed files with 16 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ namespace files {
// Return as-is if it exists, else traverse the filesystem looking for
// a path that matches case insensitively
std::filesystem::path path = std::filesystem::path(str);
std::filesystem::path path = std::filesystem::path(str).lexically_normal();
if (std::filesystem::exists(path)) {
return path;
}
@@ -58,7 +58,7 @@ namespace files {
}
std::string pathToWindows(const std::filesystem::path &path) {
std::string str = path;
std::string str = path.lexically_normal();
if (path.is_absolute()) {
str.insert(0, "Z:");