mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
generic fix for Exceptions that heppen when trying to set permissions on extracted files fixes ansible/ansible#10934 which is really a corner case
This commit is contained in:
parent
935550d20d
commit
0567404c03
1 changed files with 4 additions and 1 deletions
|
@ -303,7 +303,10 @@ def main():
|
|||
# do we need to change perms?
|
||||
for filename in handler.files_in_archive:
|
||||
file_args['path'] = os.path.join(dest, filename)
|
||||
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
|
||||
try:
|
||||
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
|
||||
except (IOError, OSError), e:
|
||||
module.fail_json(msg="Unexpected error when accessing exploded file: %s" % str(e))
|
||||
|
||||
if module.params['list_files']:
|
||||
res_args['files'] = handler.files_in_archive
|
||||
|
|
Loading…
Reference in a new issue