From 85b83fddb16c6ac0254f6e23279e6fd395d20b98 Mon Sep 17 00:00:00 2001 From: xuty Date: Tue, 17 Dec 2024 15:13:15 +0800 Subject: [PATCH] Use GetTempPathW for better compatibility --- Sources/System/FilePath/FilePathTempWindows.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/System/FilePath/FilePathTempWindows.swift b/Sources/System/FilePath/FilePathTempWindows.swift index 0d97edc..d6e45f4 100644 --- a/Sources/System/FilePath/FilePathTempWindows.swift +++ b/Sources/System/FilePath/FilePathTempWindows.swift @@ -17,7 +17,7 @@ internal func _getTemporaryDirectory() throws -> FilePath { capacity: Int(MAX_PATH) + 1) { buffer in - guard GetTempPath2W(DWORD(buffer.count), buffer.baseAddress) != 0 else { + guard GetTempPathW(DWORD(buffer.count), buffer.baseAddress) != 0 else { throw Errno(windowsError: GetLastError()) }