Skip to content

Commit 7515212

Browse files
search for user corpora with parentId in query
1 parent 6f3b71c commit 7515212

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

components/google_drive/actions/create-folder/create-folder.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,17 @@ export default {
7878
} else {
7979
q += ` and '${driveId}' in parents`;
8080
}
81-
const folders = (await this.googleDrive.listFilesInPage(null, getListFilesOpts(drive, {
81+
82+
const opts = getListFilesOpts(driveId, {
83+
// Used for querying 'shared with me' folders that the user does not have direct access to
84+
// within a shared drive (e.g., when the user can't select the driveId of the shared drive).
85+
corpora: "user",
86+
includeItemsFromAllDrives: true,
87+
supportsAllDrives: true,
8288
q,
83-
}))).files;
89+
});
90+
91+
const folders = (await this.googleDrive.listFilesInPage(null, opts)).files;
8492

8593
if (folders.length) {
8694
$.export("$summary", "Found existing folder, therefore not creating folder. Returning found folder.");

0 commit comments

Comments
 (0)