From 56b206f87726312fbce8251aff2794e02e0c2254 Mon Sep 17 00:00:00 2001 From: Francesco Paolo Severino Date: Mon, 9 Sep 2024 19:28:49 +0200 Subject: [PATCH] New sophisticated debugging --- Sources/Zip/Zip.swift | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Sources/Zip/Zip.swift b/Sources/Zip/Zip.swift index 9fb0daf8..d5b6cd98 100644 --- a/Sources/Zip/Zip.swift +++ b/Sources/Zip/Zip.swift @@ -101,6 +101,7 @@ public class Zip { var isDirectory = false let fileInfoSizeFileName = Int(fileInfo.size_filename - 1) + print("fileName[fileInfoSizeFileName] = \(fileName[fileInfoSizeFileName])") if (fileName[fileInfoSizeFileName] == "/".cString(using: String.Encoding.utf8)?.first || fileName[fileInfoSizeFileName] == "\\".cString(using: String.Encoding.utf8)?.first) { isDirectory = true } @@ -144,14 +145,7 @@ public class Zip { } var writeBytes: UInt64 = 0 - #if os(Windows) - let filePointer: UnsafeMutablePointer? = fopen( - fullPath.prefix(2) + fullPath.dropFirst(2).replacingOccurrences(of: ":", with: "/"), - "wb" - ) - #else let filePointer: UnsafeMutablePointer? = fopen(fullPath, "wb") - #endif while let filePointer { let readBytes = unzReadCurrentFile(zip, &buffer, bufferSize) guard readBytes > 0 else { break }