googledrive
googledrive copied to clipboard
drive_ls "recursive" flag broken
drive_ls(..., recursive = T)
Only expands the first "folder" in the path.
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?
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!
Ok great. FYI, you have the power to close it, if you opened it.
I have had the same problem. @lotard what did you find that caused interference, if you would be so kind?
@jennybc I fixed it in Falnesio:Fix-recursiveness-in-drive_ls. It wasn't working in shared drives.
@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.
This folder has been made public. https://drive.google.com/drive/u/0/folders/1QPDu46aGHh8EjdJm-i12NzcVVBlVjyvt
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]>