mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
[PR #8925/7c913b23 backport][stable-9] Pass absolute paths to atomic_move() (#8959)
Pass absolute paths to atomic_move() (#8925)
Pass absolute paths to atmoic_move().
(cherry picked from commit 7c913b239a
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
55d44975dd
commit
185bdaaa39
6 changed files with 12 additions and 6 deletions
|
@ -685,7 +685,7 @@ class JenkinsPlugin(object):
|
|||
|
||||
# Move the updates file to the right place if we could read it
|
||||
if tmp_updates_file != updates_file:
|
||||
self.module.atomic_move(tmp_updates_file, updates_file)
|
||||
self.module.atomic_move(os.path.abspath(tmp_updates_file), os.path.abspath(updates_file))
|
||||
|
||||
# Check if we have the plugin data available
|
||||
if not data.get('plugins', {}).get(self.params['name']):
|
||||
|
@ -718,7 +718,7 @@ class JenkinsPlugin(object):
|
|||
details=to_native(e))
|
||||
|
||||
# Move the file onto the right place
|
||||
self.module.atomic_move(tmp_f, f)
|
||||
self.module.atomic_move(os.path.abspath(tmp_f), os.path.abspath(f))
|
||||
|
||||
def uninstall(self):
|
||||
changed = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue