File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,11 @@ extension Path {
431431private struct UNIXPath : Path {
432432 let string : String
433433
434+ #if os(Windows)
435+ static let root = UNIXPath ( string: " \\ " )
436+ #else
434437 static let root = UNIXPath ( string: " / " )
438+ #endif
435439
436440 static func isValidComponent( _ name: String ) -> Bool {
437441#if os(Windows)
@@ -550,7 +554,7 @@ private struct UNIXPath: Path {
550554 var result : [ WCHAR ] = Array < WCHAR > ( repeating: 0 , count: Int ( MAX_PATH + 1 ) )
551555
552556 _ = path. standardizingPathSeparator ( ) . withCString ( encodedAs: UTF16 . self) {
553- PathCchCanonicalize ( $0 , result. length , $0)
557+ PathCchCanonicalize ( & result , result. count , $0)
554558 }
555559 self . init ( string: String ( decodingCString: result, as: UTF16 . self) )
556560 #else
You can’t perform that action at this time.
0 commit comments