Use path format specific separator for root prefix segment.

Fixes format invariant checks for formats that do not use "/" as a path separator.
This commit is contained in:
Sönke Ludwig 2021-01-19 10:34:22 +01:00
parent 246b5262c6
commit 9f73049196

View file

@ -333,7 +333,7 @@ struct GenericPath(F) {
if (m_path.length) {
auto ap = Format.getAbsolutePrefix(m_path);
if (ap.length && !Format.isSeparator(ap[0]))
m_front = Segment.fromTrustedString(null, '/');
m_front = Segment.fromTrustedString(null, Format.defaultSeparator);
else readFront();
}
}
@ -677,7 +677,7 @@ struct GenericPath(F) {
if (m_path.length) {
auto ap = Format.getAbsolutePrefix(m_path);
if (ap.length && !Format.isSeparator(ap[0]))
m_front = Segment2.fromTrustedEncodedString(null, '/');
m_front = Segment2.fromTrustedEncodedString(null, Format.defaultSeparator);
else readFront();
}
}