Commit a5a9dcee authored by Julien Muchembled's avatar Julien Muchembled

download-unpacked: fix strip-top-level-dir if unset and nothing should be stripped

This fixes a regression that was introduced in
commit d5f5d399.
parent b645dc1d
Pipeline #17561 running with stage
in 0 seconds
......@@ -91,10 +91,11 @@ class Recipe(EnvironMixin):
strip = self._strip
if strip is None:
a = os.listdir(location)
if len(a) == 1:
a = os.path.join(location, *a)
if not os.path.isdir(a):
return
if len(a) != 1:
return
a = os.path.join(location, *a)
if not os.path.isdir(a):
return
elif strip:
a, = os.listdir(location)
a = os.path.join(location, a)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment