             // might be an empty path (when self and the base are equal).
             let relComps = pathComps.dropFirst(baseComps.count)
 #if os(Windows)
-            result = RelativePath(relComps.joined(separator: "\\"))
+            result = RelativePath(unsafeUncheckedPath: relComps.joined(separator: "\\"))
 #else
             result = RelativePath(relComps.joined(separator: "/"))
 #endif

    /// Private initializer when the backing storage is known.
    private init(_ impl: PathImpl) {
        _impl = impl
    }

    /// Initializes the RelativePath from `str`, which must be a relative path

            var relComps = Array(repeating: "..", count: newBaseComps.count)
            relComps.append(contentsOf: newPathComps)
#if os(Windows)
            result = RelativePath(unsafeUncheckedPath: relComps.joined(separator: "\\"))
#else
            result = RelativePath(relComps.joined(separator: "/"))
#endif
        }

        assert(AbsolutePath(base, result) == self)
        return result
    }
