Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1698 by [email protected]: Can not unzip a zip file that does
not contain directory structure
http://code.google.com/p/robotframework/issues/detail?id=1698
I created a ZIP file that does not contain directory strcuture. Yes, it is
possible via java library.
When using Extract ZIP File keyword,an error occurs "..directory does not
exist".
So I modified the code so it can create the directories and it works.
The library as it is today does not handle a ZIP file that does not contain
directory structure. 7zip can handle it for example.
Here is the code that I added, we could perform it:
def extract(self, zfile, dest='.'):
...
# extract files to directory structure
for i, name in enumerate(zf.namelist()):
azipfile = os.path.join(dest, name)
if not name.endswith('/'):
azipfile_parent = os.path.dirname(azipfile)
-->if not os.path.exists(azipfile_parent):
--> os.makedirs(azipfile_parent)
...
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.