mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix salt.utils.recursive_copy
for Windows
Use os.sep instead of hard-coded `/`
This commit is contained in:
parent
6da4d1d95e
commit
121cd4ef81
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