Skip to content

Commit 8f467d8

Browse files
authored
Merge pull request #131 from compnerd/rooted
TSCBasic: more special case handling for Windows paths
2 parents 6eb4fd1 + e6a7fbe commit 8f467d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/TSCBasic/Path.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ public struct AbsolutePath: Hashable {
133133

134134
/// True if the path is the root directory.
135135
public var isRoot: Bool {
136+
#if os(Windows)
137+
return _impl.string.withCString(encodedAs: UTF16.self, PathIsRootW)
138+
#else
136139
return _impl == PathImpl.root
140+
#endif
137141
}
138142

139143
/// Returns the absolute path with the relative path applied.

0 commit comments

Comments
 (0)