mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Added changes for fix_39445
This commit is contained in:
parent
11d2f5abec
commit
52b3d986b5
1 changed files with 5 additions and 0 deletions
|
@ -4723,6 +4723,11 @@ def copy(
|
|||
try:
|
||||
if os.path.isdir(source):
|
||||
shutil.copytree(source, name, symlinks=True)
|
||||
for root, dirs, files in os.walk(name):
|
||||
for dir_ in dirs:
|
||||
__salt__['file.chown'](os.path.join(root, dir_), user, group)
|
||||
for file_ in files:
|
||||
__salt__['file.chown'](os.path.join(root, file_), user, group)
|
||||
else:
|
||||
shutil.copy(source, name)
|
||||
ret['changes'] = {name: source}
|
||||
|
|
Loading…
Add table
Reference in a new issue