aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2022-02-04 08:59:17 -0500
committerRyan Ofsky <ryan@ofsky.org>2022-02-04 09:09:09 -0500
commit80cd64e84296f1166e133c237fa0afc046b01ce2 (patch)
tree495af6e068894dafbd72a33a48fc2ec438d3c0b9 /src/util
parent3ace3a17c9bce606cea05192f0da3ac62ac69dda (diff)
Re-enable util_datadir check disabled in #20744
This should also fix an assert error if a -datadir with a trailing slash is used on windows. This appears to be a real error and regression introduced with #20744. On windows (or at least wine), fs calls that actuallly access the filesystem like fs::equivalent or fs::exists seem to treat directory paths with trailing slashes as not existing, so it's necessary to normalize these paths before using them. This fix adds a path::lexically_normal() call to the failing assert so it passes.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/system.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 0ee63f6381..8d0cec249d 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -253,7 +253,7 @@ fs::path StripRedundantLastElementsOfPath(const fs::path& path)
result = result.parent_path();
}
- assert(fs::equivalent(result, path));
+ assert(fs::equivalent(result, path.lexically_normal()));
return result;
}
} // namespace