Commit 2fce1d6f authored by Julien Muchembled's avatar Julien Muchembled

download: only take basename of 'filename' when the latter is used to calculate destination path

Currently only useful for buildout.hash.cfg files in
https://lab.nexedi.com/nexedi/slapos (e.g. software/slaprunner)
parent 065e198a
......@@ -52,8 +52,11 @@ class Recipe(object):
shared.assertNotShared("option 'destination' can't be set")
else:
self._shared = shared
filename = options.get('filename')
destination = os.path.join(shared.location,
options.get('filename') or name)
# filename may be used to also construct source-related options
# and we have values that start with a subfolder
os.path.basename(filename) if filename else name)
# Compatibility with other recipes: expose location
options['location'] = shared.location
options['target'] = self._destination = destination
......
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