sdecode strings in file state

This commit is contained in:
Justin Findlay 2015-11-11 16:16:11 -07:00
parent fe4d08526d
commit 7f95c483e1

View file

@ -252,6 +252,7 @@ import salt.payload
import salt.utils
import salt.utils.templates
import salt.utils.url
from salt.utils.locales import sdecode
from salt.exceptions import CommandExecutionError
from salt.serializers import yaml as yaml_serializer
from salt.serializers import json as json_serializer
@ -2082,7 +2083,7 @@ def recurse(name,
recursively removed so that symlink creation can proceed. This
option is usually not needed except in special circumstances.
'''
name = os.path.expanduser(name)
name = os.path.expanduser(sdecode(name))
user = _test_owner(kwargs, user=user)
if salt.utils.is_windows():
@ -2319,7 +2320,7 @@ def recurse(name,
# the file to copy from; it is either a normal file or an
# empty dir(if include_empty==true).
relname = os.path.relpath(fn_, srcpath)
relname = sdecode(os.path.relpath(fn_, srcpath))
if relname.startswith('..'):
continue