mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07:00
Fix remote checksums when paths have leading dots (#45287)
* Fix remote checksums with paths have leading dots * Fix result recorded from the wrong file * Add changelog fragment
This commit is contained in:
parent
5d6f844eba
commit
600c7ac108
3 changed files with 29 additions and 1 deletions
|
@ -465,7 +465,7 @@ def main():
|
|||
os.remove(checksum_tmpsrc)
|
||||
lines = dict(s.split(None, 1) for s in lines)
|
||||
filename = url_filename(url)
|
||||
[checksum] = (k for (k, v) in lines.items() if v == filename)
|
||||
[checksum] = (k for (k, v) in lines.items() if v.strip('./') == filename)
|
||||
# Remove any non-alphanumeric characters, including the infamous
|
||||
# Unicode zero-width space
|
||||
checksum = re.sub(r'\W+', '', checksum).lower()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue