Skip to content

Commit c6e4b52

Browse files
committed
Hmm, not sure why it worked yesterday, but this is better.
1 parent de46754 commit c6e4b52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

distcmd/fixtar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ def repack_tar(self, infilename, outfilename):
4242
for itarinfo in itar:
4343
otarinfo = otar.gettarinfo(itarinfo.name)
4444
if the_dir is None:
45-
n = itarinfo.name
46-
assert n.count("/") == 1 and n.endswith("/")
47-
the_dir = n[:-1]
45+
n = itarinfo.name.rstrip("/")
46+
assert "/" not in n
47+
the_dir = n
4848
if itarinfo.isfile():
4949
otarinfo.mode = 0644
5050
else:

0 commit comments

Comments
 (0)