Skip to content

Commit 8c67740

Browse files
committed
Don't strip Windows NT prefix from cwd
1 parent 02c0494 commit 8c67740

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/FileManager/FileManager+Directories.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ extension _FileManagerImpl {
516516
// Handle Windows NT object namespace prefix
517517
// The \\?\ prefix is used by Windows NT for device paths and may appear
518518
// in current working directory paths. We strip it to return a standard path.
519-
return cwd?.removingNTPathPrefix()
519+
return cwd
520520
#else
521521
withUnsafeTemporaryAllocation(of: CChar.self, capacity: FileManager.MAX_PATH_SIZE) { buffer in
522522
guard getcwd(buffer.baseAddress!, FileManager.MAX_PATH_SIZE) != nil else {

0 commit comments

Comments
 (0)