weichsel / ZIPFoundation

Effortless ZIP Handling in Swift
MIT License
2.31k stars 255 forks source link

Fixed: Swift error in file Archive+MemoryFile.swift #322

Closed Dirk-Vantas closed 3 months ago

Dirk-Vantas commented 3 months ago

Fixes #320

Fixed this smal error occuring during building of the package :

error: value of optional type 'UnsafeMutablePointer<FILE>?' (aka 'Optional<UnsafeMutablePointer<_IO_FILE>>') must be unwrapped to a value of type 'UnsafeMutablePointer<FILE>' (aka 'UnsafeMutablePointer<_IO_FILE>')
fseeko(result, 0, SEEK_END)

Changes proposed in this PR

The proposed change in the MemoryFile class aims to address a build error related to the unwrapping of an optional value. The error message indicated that result, which is of the type UnsafeMutablePointer? (an optional pointer to a file), must be explicitly unwrapped before it can be used in the fseeko function call.

weichsel commented 3 months ago

Hi Dirk,

Thanks for making me aware of this. I just merge #323, which obsoletes append mode for the MemoryFile type. Can you please check development to see if this fixes your build issue?

Dirk-Vantas commented 3 months ago

Hey Thomas

the dev branch builds without problems :)

Dirk-Vantas commented 3 months ago

The project I am working on uses the main branch tho, when do you think this will be merged into that?