Skip to content

drive_ls "recursive" flag broken #265

Closed

Description

@lotard

drive_ls(..., recursive = T)

Only expands the first "folder" in the path.

Activity

  1. jennybc commented on Aug 9, 2019

    @jennybc
    Member

    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?

  2. added
    reprexneeds a minimal reproducible example
    on Aug 9, 2019
  3. lotard commented on Aug 9, 2019

    @lotard
    Author

    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!

  4. jennybc commented on Aug 9, 2019

    @jennybc
    Member

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

  5. Falnesio commented on Feb 23, 2022

    @Falnesio
    Contributor

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

  6. Falnesio commented on Mar 7, 2022

    @Falnesio
    Contributor

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

  7. reopened this on Mar 7, 2022
  8. jennybc commented on Mar 7, 2022

    @jennybc
    Member

    @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.
  9. Falnesio commented on Mar 7, 2022

    @Falnesio
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    reprexneeds a minimal reproducible example

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions