Skip to content
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

drive_ls "recursive" flag broken #265

Closed
lotard opened this issue Aug 7, 2019 · 7 comments · Fixed by #390
Closed

drive_ls "recursive" flag broken #265

lotard opened this issue Aug 7, 2019 · 7 comments · Fixed by #390
Labels
reprex needs a minimal reproducible example

Comments

@lotard
Copy link

lotard commented Aug 7, 2019

drive_ls(..., recursive = T)

Only expands the first "folder" in the path.

@jennybc
Copy link
Member

jennybc commented Aug 9, 2019

Can you provide a more detailed reprex of what you have (in terms of file/directory state on Drive), what call you make, results you expect vs. results you get?

@jennybc jennybc added the reprex needs a minimal reproducible example label Aug 9, 2019
@lotard
Copy link
Author

lotard commented Aug 9, 2019

Mhm, doesn't seem to be a problem anymore, not sure why, maybe some interference from other packages or environmental variables... Please close this issue, sorry for wasting your time!

@jennybc
Copy link
Member

jennybc commented Aug 9, 2019

Ok great. FYI, you have the power to close it, if you opened it.

@jennybc jennybc closed this as completed Aug 9, 2019
@Falnesio
Copy link
Contributor

I have had the same problem. @lotard what did you find that caused interference, if you would be so kind?

@Falnesio
Copy link
Contributor

Falnesio commented Mar 7, 2022

@jennybc I fixed it in Falnesio:Fix-recursiveness-in-drive_ls. It wasn't working in shared drives.

@jennybc jennybc reopened this Mar 7, 2022
@jennybc
Copy link
Member

jennybc commented Mar 7, 2022

@Falnesio Can you add "Fixes #265" to your PR to link it to this?

When I come back through to review it, it would still be extremely helpful to have a clean reprex that helps me:

  • Experience the problem first hand. Meaning: sets up the situation where we can see drive_ls() fail. I can imagine what's going wrong, but it's so much faster if someone who is suffering has already constructed the perfect example.
  • Experience the joy of seeing it fixed by the PR first hand.

@Falnesio
Copy link
Contributor

Falnesio commented Mar 7, 2022

This folder has been made public.
https://drive.google.com/drive/u/0/folders/1QPDu46aGHh8EjdJm-i12NzcVVBlVjyvt

image

Before fix:

## install googledrive from this PR
## install_github("tidyverse/googledrive#190")
library(googledrive)

## I have many tokens and want to use a specific one.
## Other people can just let the OAuth2 flow happen.
drive_auth("tidyverse-noncaching-token.rds")

drive_ls(as_id("1QPDu46aGHh8EjdJm-i12NzcVVBlVjyvt"), recursive = TRUE, type="folder")
# A dribble: 3 x 3
#  name  id                                drive_resource   
#  <chr> <drv_id>                          <list>           
#1 C     1iuIBsZTQNQPfdYkFqRdsbHX8fcpjb3ya <named list [32]>
#2 A     17qBnOnqjP3nemZdo5bcY4htnp4IZJrxg <named list [32]>
#3 B     186JZdflymqlq-DVa8S0jXbMGhcTEF5Vv <named list [32]>

After fix:

## install googledrive from this PR
## install_github("tidyverse/googledrive#190")
library(googledrive)

## I have many tokens and want to use a specific one.
## Other people can just let the OAuth2 flow happen.
drive_auth("tidyverse-noncaching-token.rds")

drive_ls(as_id("1QPDu46aGHh8EjdJm-i12NzcVVBlVjyvt"), recursive = TRUE, type="folder")
# A dribble: 6 x 3
#  name  id                                drive_resource   
#  <chr> <drv_id>                          <list>           
#1 B.3   1N9BRc3DNfBNa3csrbe8vnmBTO0f8IOSa <named list [32]>
#2 C     1iuIBsZTQNQPfdYkFqRdsbHX8fcpjb3ya <named list [32]>
#3 B.2   1Q0o-D6r8xJgIOkyqkrGCLk5vGOdR-Rkg <named list [32]>
#4 A     17qBnOnqjP3nemZdo5bcY4htnp4IZJrxg <named list [32]>
#5 A.1   1Qy6-CS5KAbYTuvu4jZjj7rL90j9kdg1O <named list [32]>
#6 B     186JZdflymqlq-DVa8S0jXbMGhcTEF5Vv <named list [32]>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex needs a minimal reproducible example
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants