diff --git a/salt/master.py b/salt/master.py index a6e30734ff..0741ea0138 100644 --- a/salt/master.py +++ b/salt/master.py @@ -379,19 +379,20 @@ class AESFuncs(object): environment ''' ret = [] - if not self.opts['file_roots'].has_key('env'): + if not self.opts['file_roots'].has_key(load['env']): return ret - for root, dirs, files in os.walk(self.opts['file_roots'][load[env]]): - for fn in files: - ret.append( - os.path.relpath( - os.path.join( - root, - fn - ), - self.opts['file_roots'][load['env']] + for path in self.opts['file_roots'][load['env']]: + for root, dirs, files in os.walk(path): + for fn in files: + ret.append( + os.path.relpath( + os.path.join( + root, + fn + ), + path + ) ) - ) return ret def _master_opts(self, load): diff --git a/salt/minion.py b/salt/minion.py index 79dffa408b..3bdd6894fc 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -537,7 +537,6 @@ class FileClient(object): ''' List the files on the master ''' - path = self._check_proto(path) payload = {'enc': 'aes'} load = {'env': env, 'cmd': '_file_list'}