From 6e72b6ef7cb0650c6aa29a6fc976758fc9d18eb9 Mon Sep 17 00:00:00 2001 From: Gorka Navarrete Date: Sun, 3 Sep 2023 09:21:08 +0100 Subject: [PATCH 1/2] Use a dribble to define the upload destination path --- R/board_gdrive.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/board_gdrive.R b/R/board_gdrive.R index a613bdb7..bb470070 100644 --- a/R/board_gdrive.R +++ b/R/board_gdrive.R @@ -140,20 +140,23 @@ pin_store.pins_board_gdrive <- function(board, name, paths, metadata, gdrive_mkdir(fs::path(board$dribble$name, name), version) version_dir <- fs::path(name, version) + version_dir_dribble = googledrive::as_dribble(version_dir) # Upload metadata temp_file <- withr::local_tempfile() yaml::write_yaml(metadata, file = temp_file) googledrive::drive_upload( temp_file, - fs::path(board$dribble$path, version_dir, "data.txt") + version_dir_dribble, + "data.txt" ) # Upload files for (path in paths) { googledrive::drive_upload( path, - fs::path(board$dribble$path, version_dir, fs::path_file(path)) + version_dir_dribble, + fs::path_file(path) ) } From c2afb43bf6a94dc9018bc6d2ae3ae2338a1e9aa2 Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Tue, 5 Sep 2023 12:53:05 -0600 Subject: [PATCH 2/2] Update NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index e33656bc..40f851ff 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,8 @@ * Added `board_deparse` for `board_url()` (#774). +* Fixed how `board_gdrive()` makes version directories (#780, @gorkang). + # pins 1.2.1