From 8c67740fc5d5af77879b0c99e13891683f091b19 Mon Sep 17 00:00:00 2001 From: Jonathan Flat Date: Mon, 15 Sep 2025 23:56:51 -0600 Subject: [PATCH] Don't strip Windows NT prefix from cwd --- .../FileManager/FileManager+Directories.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift b/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift index aa7c6eee5..49009cfed 100644 --- a/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift +++ b/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift @@ -516,7 +516,7 @@ extension _FileManagerImpl { // Handle Windows NT object namespace prefix // The \\?\ prefix is used by Windows NT for device paths and may appear // in current working directory paths. We strip it to return a standard path. - return cwd?.removingNTPathPrefix() + return cwd #else withUnsafeTemporaryAllocation(of: CChar.self, capacity: FileManager.MAX_PATH_SIZE) { buffer in guard getcwd(buffer.baseAddress!, FileManager.MAX_PATH_SIZE) != nil else {