Skip to content

Commit

Permalink
Don't use os.path.sep for creating tar paths (#178)
Browse files Browse the repository at this point in the history
The paths to files within a tarball should always use '/' as a
separator. This is particularly important on Windows, where os.path.sep
is '\'.
  • Loading branch information
cottsay authored May 3, 2024
1 parent 7e2b148 commit 0b24791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosdistro/manifest_provider/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def tar_manifest_provider(_dist_name, repo, pkg_name):

response = urlopen(request)
with tarfile.open(fileobj=io.BytesIO(response.read())) as tar:
package_xml = tar.extractfile(os.path.join(subdir, 'package.xml')).read()
package_xml = tar.extractfile(subdir + '/package.xml').read()

# Python2 returns strings, Python3 returns bytes-- support both
try:
Expand Down

0 comments on commit 0b24791

Please sign in to comment.