Skip to content

Commit

Permalink
Update gdrive_download() to use dribble (not path)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Sep 8, 2023
1 parent d724f8b commit 0520983
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/board_gdrive.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0520983

Please sign in to comment.