From 9f730491961e0b2847cfc2263d63c7515c6a81fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 19 Jan 2021 10:34:22 +0100 Subject: [PATCH] Use path format specific separator for root prefix segment. Fixes format invariant checks for formats that do not use "/" as a path separator. --- source/vibe/core/path.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/vibe/core/path.d b/source/vibe/core/path.d index f2eff9c..4190075 100644 --- a/source/vibe/core/path.d +++ b/source/vibe/core/path.d @@ -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(); } }