Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions planemo/shed.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,19 @@ def build_tarball(tool_path):
ignore_list.extend(glob.glob(os.path.join(tool_path, shed_ignore)))
try:
with tarfile.open(temp_path, "w:gz") as tar:
for name in os.listdir(tool_path):
if not os.path.join(tool_path, name) in ignore_list:
if os.path.islink(name):
path = os.path.realpath(name)
else:
path = os.path.join(tool_path, name)
tar.add(path, name, recursive=True, exclude=_tar_excludes)
for root, _, files in os.walk(tool_path, followlinks=True):
for name in files:
full_path = os.path.join(root, name)
relative_path = os.path.relpath(full_path, tool_path)
if not relative_path in ignore_list:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davebx - can you switch this to relative_path not in ignore_list? I think after that Travis should okay the pull request.

if os.path.islink(full_path):
path = os.path.realpath(full_path)
else:
path = full_path
tar.add(path,
relative_path,
recursive=True,
exclude=_tar_excludes)
finally:
os.close(fd)
return temp_path
Expand Down