Skip to content

addFile StringStream fails on Windows #45

@cark

Description

@cark

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions