From 05209834f5d47458098110805ef07eab74cfdd5c Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 11:42:28 -0600 Subject: [PATCH] Update `gdrive_download()` to use dribble (not path) --- R/board_gdrive.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/board_gdrive.R b/R/board_gdrive.R index b049e223..539d1dc0 100644 --- a/R/board_gdrive.R +++ b/R/board_gdrive.R @@ -202,7 +202,10 @@ gdrive_file_exists <- function(board, name) { gdrive_download <- function(board, key) { path <- fs::path(board$cache, key) if (!fs::file_exists(path)) { - googledrive::drive_download(key, path) + dribble <- googledrive::as_dribble(fs::path_dir(key)) + dribble <- googledrive::drive_ls(dribble) + dribble <- dribble[dribble$name == fs::path_file(key),] + googledrive::drive_download(dribble, path) fs::file_chmod(path, "u=r") } path