"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 <khiremat@redhat.com>
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