We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aef445 commit 48dfe9dCopy full SHA for 48dfe9d
Sources/TSCBasic/Path.swift
@@ -431,7 +431,11 @@ extension Path {
431
private struct UNIXPath: Path {
432
let string: String
433
434
+#if os(Windows)
435
+ static let root = UNIXPath(string: "\\")
436
+#else
437
static let root = UNIXPath(string: "/")
438
+#endif
439
440
static func isValidComponent(_ name: String) -> Bool {
441
#if os(Windows)
@@ -550,7 +554,7 @@ private struct UNIXPath: Path {
550
554
var result: [WCHAR] = Array<WCHAR>(repeating: 0, count: Int(MAX_PATH + 1))
551
555
552
556
_ = path.standardizingPathSeparator().withCString(encodedAs: UTF16.self) {
553
- PathCchCanonicalize($0, result.length, $0)
557
+ PathCchCanonicalize(&result, result.count, $0)
558
}
559
self.init(string: String(decodingCString: result, as: UTF16.self))
560
#else
0 commit comments