Skip to content

Commit

Permalink
Iterate through filtered file types instead of all listed files (#6258)
Browse files Browse the repository at this point in the history
# Iterate through filtered file types instead of all listed files

Fixes #6257

#4926 originally added the
functionality to filter by file type, storing the filtered files in
`_files`

#5220 removed the
functionality when adding code to filter trashed files by using the
`files` variables instead of the `_files` variable.

This PR simply adds the functionality back by using `_files` again.

#### Who can review?

@hwchase17 - project lead
@eyurtsev
  • Loading branch information
tedhli authored Jun 19, 2023
1 parent ba90e3c commit 112695e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langchain/document_loaders/googledrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _load_documents_from_folder(
_files = files

returns = []
for file in files:
for file in _files:
if file["trashed"] and not self.load_trashed_files:
continue
elif file["mimeType"] == "application/vnd.google-apps.document":
Expand Down

0 comments on commit 112695e

Please sign in to comment.