[s3] Opening S3 browser makes a call to HDFS
@@ -437,7 +437,10 @@ def listdir_paged(request, path):
if hasattr(request, 'doas'):
do_as = request.doas
+ if request.fs._get_scheme(path) == 'hdfs':
home_dir_path = request.user.get_home_directory()
+ else:
+ home_dir_path = None
breadcrumbs = parse_breadcrumbs(path)
if do_as:
@@ -508,7 +511,7 @@ def listdir_paged(request, path):
'files': page.object_list if page else [],
'page': _massage_page(page, paginator) if page else {},
'pagesize': pagesize,
- 'home_directory': request.fs.isdir(home_dir_path) and home_dir_path or None,
+ 'home_directory': home_dir_path and request.fs.isdir(home_dir_path) or None,
'descending': descending_param,
# The following should probably be deprecated
'cwd_set': True,
