Merge pull request #27977 from cachedout/issuse_27712

Decode unicode names in fileclient/server
This commit is contained in:
Nicole Thomas 2015-10-15 09:17:01 -06:00
commit 6f8925ee84
2 changed files with 3 additions and 1 deletions

View File

@ -228,6 +228,7 @@ class Client(object):
# go through the list of all files finding ones that are in
# the target directory and caching them
for fn_ in self.file_list(saltenv):
fn_ = salt.utils.locales.sdecode(fn_)
if fn_.strip() and fn_.startswith(path):
if salt.utils.check_include_exclude(
fn_, include_pat, exclude_pat):

View File

@ -551,7 +551,8 @@ class Fileserver(object):
if 'path' not in load or 'saltenv' not in load:
return ''
fnd = self.find_file(load['path'], load['saltenv'])
fnd = self.find_file(salt.utils.locales.sdecode(load['path']),
load['saltenv'])
if not fnd.get('back'):
return ''
fstr = '{0}.file_hash'.format(fnd['back'])