Fix salt.utils.recursive_copy for Windows

Use os.sep instead of hard-coded `/`
This commit is contained in:
twangboy 2017-08-15 16:53:28 -06:00
parent 6da4d1d95e
commit 121cd4ef81

View file

@ -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)