-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Shared Drives #40
Comments
Actually, I see there was already a request for this in #26. |
YEs, exactly so - I believe this is well worth adding, but I am unsure how to expose the possibility to users. I believe simply checking all possible drives every time is probably a substantial slowdown, but I am happy to be told otherwise. |
@martindurant when you say "checking all possible drives" do you mean in the I've only just started using gdrivefs, but it seems that you need to specify an exact path from the root folder set in the storage options, so I don't think enabling shared drives universally would be any slower - if you don't set the shared drive folder (or one of its subfolders) as the And the mechanism that finds the exact file id executes one request/response per path segment, so the performance of that seems to be dependent on how many levels deep your path is from the |
Support shared drives as per https://developers.google.com/drive/api/guides/enable-shareddrives
Currently, gdrivefs doesn't support shared drives.
I have a setup like:
If I attempt to access that file (using commit 2b48baa), I get the error:
The
root_file_id
is set to the folder id of a GDrive Shared Drive (i.e. https://support.google.com/a/users/answer/7212025?hl=en).As per https://developers.google.com/drive/api/guides/enable-shareddrives#:~:text=The%20supportsAllDrives%3Dtrue%20parameter%20informs,require%20additional%20shared%20drive%20functionality. we need to set
supportsAllDrives=True
andincludeItemsFromAllDrives=True
when callingfiles.list
in order for the API client to find the files.In my case, if I change the existing:
to
(note the change in the call to
self.service.list
)then my code works, and the filesystem can find the file and open it successfully.
I am happy to prepare an MR, but you would need to decide whether you are happy for me to enable shared drive support in all cases, or whether you want to control it via
storage_options
. And if viastorage_options
whether it should default to off (completely backwards compatible) or on (may show new files to existing users with shared drives that they don't currently get returned from gdrivefs).The text was updated successfully, but these errors were encountered: