mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42964 from twangboy/win_fix_recursive_copy
Fix `salt.utils.recursive_copy` for Windows
This commit is contained in:
commit
7dddeeea8d
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ def recursive_copy(source, dest):
|
|||
(identical to cp -r on a unix machine)
|
||||
'''
|
||||
for root, _, files in os.walk(source):
|
||||
path_from_source = root.replace(source, '').lstrip('/')
|
||||
path_from_source = root.replace(source, '').lstrip(os.sep)
|
||||
target_directory = os.path.join(dest, path_from_source)
|
||||
if not os.path.exists(target_directory):
|
||||
os.makedirs(target_directory)
|
||||
|
|
Loading…
Add table
Reference in a new issue