MarketSquare / MarketSquare/robotframework-archivelibrary

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

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
21
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating create_zip_from_files_in_directory and return_files_lists in the repository, then reproduce the Windows case described in the issue with the output ZIP inside the source directory. Check that the implementation does not repeatedly include the ZIP it is creating; done means the archive completes without looping and contains the intended source files.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.