'ls -a' command should only list the hidden files and directories. This patch
fixes such listing by any other 'ls' commands.
Fixes: https://tracker.ceph.com/issues/38804
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit
67b670b74a0af34aace38e3a8ae99980f4012605)
self.poutput(dir_name, ':\n')
items = sorted(list_items(dir_name),
key=lambda item: item.d_name)
- if not args.all and len(items) > 2:
+ if not args.all and len(items) >= 2:
items = [i for i in items if not i.d_name.startswith('.')]
flag = 0
if args.S: