From: Kotresh HR Date: Thu, 23 Jan 2020 11:33:01 +0000 (+0530) Subject: cephfs-shell: Fix ls -l X-Git-Tag: v15.1.1~609^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32801%2Fhead;p=ceph.git cephfs-shell: Fix ls -l "ls -l" fails with ENOENT when it's executed outside root directory. This patch fixes the same. Fixes: https://tracker.ceph.com/issues/43763 Signed-off-by: Kotresh HR --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 01141027c26..4d1198d963b 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -808,16 +808,10 @@ class CephFSShell(Cmd): is_dir = item.is_dir() if args.long and args.H: - print_long(cephfs.getcwd() - + path - + b'/' - + filepath, + print_long(os.path.join(cephfs.getcwd(), path, filepath), is_dir, True) elif args.long: - print_long(cephfs.getcwd() - + path - + b'/' - + filepath, + print_long(os.path.join(cephfs.getcwd(), path, filepath), is_dir, False) elif is_dir: values.append(colorama.Style.BRIGHT