Skip to content

Commit

Permalink
cloud upload file check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Nov 3, 2022
1 parent 5cc2830 commit 6fbbfe6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/item_upload_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ wait_till_up <- function(item, f) {
refresh_token_before_expired()
session_renew()

files <- item_list_files(item)
files <- item_list_files(item, fetch_cloud_urls = FALSE)

if(nrow(files > 1) && grepl(f, attr(files, "cloud")[[1]]$key)) {
keys <- sapply(attr(files, "cloud"), function(x) x$key)

if(nrow(files > 1) && any(grepl(f, keys))) {
found <- TRUE
} else {
Sys.sleep(wait_time)
Expand Down

0 comments on commit 6fbbfe6

Please sign in to comment.