MarketSquare / MarketSquare/robotframework-archivelibrary
Unable to create zip file in same directory as files to be zipped
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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