Skip to content

Empty file added through .add_file() is not present in zip #222

@scholtalbers

Description

@scholtalbers

When adding a file say "empty.txt" with rocrate.add_file("empty_txt") it gets a correct entry in the metadata, but the resulting zip from write_zip() does not include that file. I would expect the file to be there.

The offending line seems to be the following, as here the file is created when a chunk is returned, which for the empty file it is not the case:

for path, chunk in writeable_entity.stream(chunk_size=chunk_size):

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