diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 424eda66..bcd9e245 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: with_linting: true with_musl: true ios_scheme_name: Zip + with_android: true secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -28,7 +29,7 @@ jobs: include: - { swift-version: 5.9, swift-branch: swift-5.9.2-release, swift-tag: 5.9.2-RELEASE } - { swift-version: 5.10, swift-branch: swift-5.10.1-release, swift-tag: 5.10.1-RELEASE } - - { swift-version: 6.0, swift-branch: swift-6.0.1-release, swift-tag: 6.0.1-RELEASE } + - { swift-version: 6.0, swift-branch: swift-6.0.3-release, swift-tag: 6.0.3-RELEASE } runs-on: windows-latest timeout-minutes: 60 steps: diff --git a/Sources/Zip/Zip.swift b/Sources/Zip/Zip.swift index b6cf91ba..4fef60cb 100644 --- a/Sources/Zip/Zip.swift +++ b/Sources/Zip/Zip.swift @@ -177,7 +177,7 @@ public class Zip { } var writeBytes: UInt64 = 0 - let filePointer: UnsafeMutablePointer? = fopen(fullPath, "wb") + let filePointer = fopen(fullPath, "wb") while let filePointer { let readBytes = unzReadCurrentFile(zip, &buffer, UInt32(buffer.count)) guard readBytes > 0 else { break } diff --git a/Tests/ZipTests/ZipTests.swift b/Tests/ZipTests/ZipTests.swift index 1e735f27..d94ecced 100644 --- a/Tests/ZipTests/ZipTests.swift +++ b/Tests/ZipTests/ZipTests.swift @@ -12,11 +12,7 @@ import XCTest final class ZipTests: XCTestCase { private func url(forResource resource: String, withExtension ext: String? = nil) -> URL? { - let resourcePath = URL(fileURLWithPath: #filePath) - .deletingLastPathComponent() - .appendingPathComponent("TestResources") - .appendingPathComponent(resource) - return ext.map { resourcePath.appendingPathExtension($0) } ?? resourcePath + Bundle.module.url(forResource: "TestResources/\(resource)", withExtension: ext) } private func autoRemovingSandbox() throws -> URL { @@ -183,6 +179,8 @@ final class ZipTests: XCTestCase { let expectedPermissions = 0o700 #elseif os(Windows) && compiler(>=6.0) let expectedPermissions = 0o600 + #elseif os(Android) + let expectedPermissions = 0o666 #else let expectedPermissions = 0o644 #endif