Skip to content

Commit 74f4fc6

Browse files
committed
TSCBasic: improve prefix check for Windows
Change the function we use to check for the root path to ensure that we can properly handle NT paths and UNC paths.
1 parent 2bf4d03 commit 74f4fc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TSCBasic/Path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public struct AbsolutePath: Hashable {
134134
/// True if the path is the root directory.
135135
public var isRoot: Bool {
136136
#if os(Windows)
137-
return _impl.string.withCString(encodedAs: UTF16.self, PathIsRootW)
137+
return _impl.string.withCString(encodedAs: UTF16.self, PathCchIsRoot)
138138
#else
139139
return _impl == PathImpl.root
140140
#endif

0 commit comments

Comments
 (0)