Skip to content

Unable to create zip file in same directory as files to be zipped #35

@Frankyboy100880

Description

@Frankyboy100880

Image that you a directory C:\MyDirectory with some files and you wanted to create a Zip-File of C:\MyDirectory with name C:\MyDirectory\mydirectory.zip. In this case the keyword

create_zip_from_files_in_directory( "C:\MyDirectory", "C:\MyDirectory\mydirectory.zip")

is creating an infinite loop by always trying to zip its own zip-file.

My guess is, that the following two lines must be interchanged:

the_zip = zipfile.ZipFile(filename, "w")
files = return_files_lists(directory, sub_directories)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions