From 9113f27985356df8109fd671d5b13a1c33ae24f0 Mon Sep 17 00:00:00 2001 From: Francesco Paolo Severino Date: Mon, 9 Sep 2024 20:37:12 +0200 Subject: [PATCH] Try fixing bug --- Sources/Zip/Zip.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Zip/Zip.swift b/Sources/Zip/Zip.swift index d4efde41..484000e1 100644 --- a/Sources/Zip/Zip.swift +++ b/Sources/Zip/Zip.swift @@ -183,7 +183,7 @@ public class Zip { // You might need to handle this separately if required } // Set the file attributes on Windows - if !SetFileAttributesW(fullPath.withCString(encodedAs: UTF16.self) { $0 }, attributes) { + if !SetFileAttributesW(fullPath.utf16.map { WCHAR($0) } + [0], attributes) { print("Failed to set permissions to file \(fullPath), error: \(GetLastError())") } #else