Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ansible galaxy file mangling #23703

Merged
merged 1 commit into from
Apr 19, 2017

Conversation

tbenk
Copy link
Contributor

@tbenk tbenk commented Apr 18, 2017

SUMMARY

without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.

this patch simply limits the replacement to the first occurence of the
archive parent directory name.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible-galaxy

without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.
@alikins
Copy link
Contributor

alikins commented Apr 19, 2017

Merging this as the fix 22572 since it fixes that while not rebreaking #15413 fixed in 19d3901

@alikins alikins merged commit 79943b8 into ansible:devel Apr 19, 2017
alikins pushed a commit that referenced this pull request Apr 19, 2017
without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.

The previous code could affect the entire path and even filenames.
If a file path has the top level dir name as a substring, galaxy
replaces it with ''. In one example, the archive top level dir
is 'go', so 'files/go-bin.sh' becomes 'files/-bin.sh'.

Fixes #22572, #23694, #23623
(cherry picked from commit 79943b8)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. c:galaxy/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants