Skip to content

Commit f18ed75

Browse files
xtyxtyxglessard
authored andcommitted
Use GetTempPathW for better compatibility
1 parent c8a44d8 commit f18ed75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/System/FilePath/FilePathTempWindows.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal func _getTemporaryDirectory() throws -> FilePath {
1717
capacity: Int(MAX_PATH) + 1) {
1818
buffer in
1919

20-
guard GetTempPath2W(DWORD(buffer.count), buffer.baseAddress) != 0 else {
20+
guard GetTempPathW(DWORD(buffer.count), buffer.baseAddress) != 0 else {
2121
throw Errno(windowsError: GetLastError())
2222
}
2323

0 commit comments

Comments
 (0)