mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #36245 from terminalmage/roots-bug
roots backend: Don't include '.' or '..' in empty_dirs
This commit is contained in:
commit
dcc9380996
@ -292,7 +292,8 @@ def _file_lists(load, form):
|
||||
dir_rel_fn = dir_rel_fn.replace('\\', '/')
|
||||
ret['dirs'].append(dir_rel_fn)
|
||||
if len(dirs) == 0 and len(files) == 0:
|
||||
if not salt.fileserver.is_file_ignored(__opts__, dir_rel_fn):
|
||||
if dir_rel_fn not in ('.', '..') \
|
||||
and not salt.fileserver.is_file_ignored(__opts__, dir_rel_fn):
|
||||
ret['empty_dirs'].append(dir_rel_fn)
|
||||
for fname in files:
|
||||
is_link = os.path.islink(os.path.join(root, fname))
|
||||
|
Loading…
Reference in New Issue
Block a user