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): ...@@ -91,10 +91,11 @@ class Recipe(EnvironMixin):
strip = self._strip strip = self._strip
if strip is None: if strip is None:
a = os.listdir(location) a = os.listdir(location)
if len(a) == 1: if len(a) != 1:
a = os.path.join(location, *a) return
if not os.path.isdir(a): a = os.path.join(location, *a)
return if not os.path.isdir(a):
return
elif strip: elif strip:
a, = os.listdir(location) a, = os.listdir(location)
a = os.path.join(location, a) 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