Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ def create_file_url(client, protocol=None, **kwargs):
def list_share_files(cmd, client, directory_name=None, timeout=None, exclude_dir=False, exclude_extended_info=False,
num_results=None, marker=None):
from ..track2_util import list_generator
include = [] if exclude_extended_info else ["timestamps", "Etag", "Attributes", "PermissionKey"]
include = None
share_properties = client.get_share_properties()
if share_properties.protocols == ['SMB']:
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protocol comparison share_properties.protocols == ['SMB'] may fail if the protocols list contains multiple values or is in a different order. Consider using 'SMB' in share_properties.protocols for more robust protocol checking.

Suggested change
if share_properties.protocols == ['SMB']:
if 'SMB' in share_properties.protocols:

Copilot uses AI. Check for mistakes.
include = [] if exclude_extended_info else ["timestamps", "Etag", "Attributes", "PermissionKey"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we warn/error out for nfs shares when exclude_extended_info is specified?

elif share_properties.protocols == ['NFS']:
if exclude_extended_info:
logger.warning('--exclude-extended-info is not supported for NFS shares.')
generator = client.list_directories_and_files(directory_name=directory_name, include=include,
timeout=timeout, results_per_page=num_results)
pages = generator.by_page(continuation_token=marker)
Expand Down
Loading