Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addFile StringStream fails on Windows #45

Open
cark opened this issue Aug 3, 2019 · 1 comment
Open

addFile StringStream fails on Windows #45

cark opened this issue Aug 3, 2019 · 1 comment

Comments

@cark
Copy link

cark commented Aug 3, 2019

While this works fine on Linux, calling addFile with a StringStream parameter fails on Windows.
The zip archive is created, but the enclosed file is 200MB+, and the archive cannot be uncompressed.

Here is a minimal example :

{.passl: "-lz".}
import zip/zipfiles
import streams

proc testZip() : void =
    var z : ZipArchive;
    var s = newStringStream("Hello world")
    if open(z, "test.zip", fmWrite):
        try:
            addFile(z, "datafile.txt", s)
        finally:
            close(z)

testZip()

On the other hand, creating zip files from on disk files works on both platforms.

@KDot227
Copy link

KDot227 commented Feb 11, 2024

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants