Skip to content

Commit 112695e

Browse files
authored
Iterate through filtered file types instead of all listed files (#6258)
# 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
1 parent ba90e3c commit 112695e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain/document_loaders/googledrive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _load_documents_from_folder(
228228
_files = files
229229

230230
returns = []
231-
for file in files:
231+
for file in _files:
232232
if file["trashed"] and not self.load_trashed_files:
233233
continue
234234
elif file["mimeType"] == "application/vnd.google-apps.document":

0 commit comments

Comments
 (0)