Skip to content

Commit

Permalink
Allow slash in file_roots envs
Browse files Browse the repository at this point in the history
Fixes: #51211
  • Loading branch information
sathieu committed Jan 17, 2019
1 parent f9437e2 commit b769f18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/fileserver/roots.py
Expand Up @@ -303,8 +303,8 @@ def _file_lists(load, form):
except os.error:
log.critical('Unable to make cachedir %s', list_cachedir)
return []
list_cache = os.path.join(list_cachedir, '{0}.p'.format(load['saltenv']))
w_lock = os.path.join(list_cachedir, '.{0}.w'.format(load['saltenv']))
list_cache = os.path.join(list_cachedir, '{0}.p'.format(salt.utils.files.safe_filename_leaf(load['saltenv'])))
w_lock = os.path.join(list_cachedir, '.{0}.w'.format(salt.utils.files.safe_filename_leaf(load['saltenv'])))
cache_match, refresh_cache, save_cache = \
salt.fileserver.check_file_list_cache(
__opts__, form, list_cache, w_lock
Expand Down

0 comments on commit b769f18

Please sign in to comment.