From 67b670b74a0af34aace38e3a8ae99980f4012605 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Fri, 29 Mar 2019 15:13:18 +0530 Subject: [PATCH] cephfs-shell: Fix hidden files and directories list by ls command '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 --- src/tools/cephfs/cephfs-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index c535df539da..88e45f1aacf 100644 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -567,7 +567,7 @@ exists.') 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: -- 2.39.5