Permalink
Browse files

Fix zipDirectory to exclude the directory from the zip folder structure

  • Loading branch information...
1 parent 6edc449 commit d37ed11f4031c9e9380605bab684f063aa64db29 @paddyforan paddyforan committed Apr 5, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 iron_worker/iron_worker.py
View
5 iron_worker/iron_worker.py
@@ -659,7 +659,7 @@ def zipDirectory(directory, destination, overwrite=False):
return False
return IronWorker.createZip(files=files, destination=destination,
- overwrite=overwrite)
+ overwrite=overwrite, root_dir=directory)
@staticmethod
def getFilenames(directory):
@@ -672,6 +672,5 @@ def getFilenames(directory):
names = []
for dirname, dirnames, filenames in os.walk(directory):
for filename in filenames:
- path = dirname.split(os.sep)
- names.append(os.path.join(os.sep.join(path[1:]), filename))
+ names.append(os.path.join(dirname, filename))
return names

0 comments on commit d37ed11

Please sign in to comment.