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:
parent
246b5262c6
commit
9f73049196
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue