Skip to content

Commit

Permalink
Use basic namespace when counting files with scandir
Browse files Browse the repository at this point in the history
Co-authored-by: David López <[email protected]>
  • Loading branch information
bwalkowi and davelopez authored Jun 12, 2024
1 parent 2ec50fb commit 396c3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/files/sources/_pyfilesystem2.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _list(
raise MessageException(f"Problem listing file source path {path}. Reason: {e}") from e

def _get_total_matches_count(self, fs: FS, path: str, filter: Optional[List[str]] = None) -> int:
return sum(1 for _ in fs.filterdir(path, namespaces=["details"], files=filter, dirs=filter))
return sum(1 for _ in fs.filterdir(path, namespaces=["basic"], files=filter, dirs=filter))

def _to_page(self, limit: Optional[int] = None, offset: Optional[int] = None) -> Optional[Tuple[int, int]]:
if limit is None and offset is None:
Expand Down

0 comments on commit 396c3e4

Please sign in to comment.