Skip to content

gcs_load_all() fails to create/load to subdirectories #112

@jasonmhoule

Description

@jasonmhoule

Trying to load from a GCS bucket on startup (using .First as shared here) and directories and subdirectories are not being loaded.

(Assuming a global bucket/auth/etc., I can make a more formal reprex if needed but I believe this will fail across the board):

library(googleCloudStorageR)

dir.create("testdir")
file.create("testdir/testfile.test")

gcs_save_all()

file.remove("testdir/testfile.test")
file.remove("testdir")

gcs_load_all()

I think the offending line is:

mapply(function(x, name){

I believe that the recursive argument on file.copy() will only work when specifying a directory, not file-by-file as the mapply() call does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions