diff --git a/R/b2ListFileNames.R b/R/b2ListFileNames.R index 15fb61b..33a4935 100644 --- a/R/b2ListFileNames.R +++ b/R/b2ListFileNames.R @@ -55,6 +55,8 @@ b2ListFileNames <- # Bind function option data frames together vars <- cbind(bucketId, startFileName, maxFileCount) + # Remove empty values + vars <- vars[, colSums(vars != "") != 0] # API call b2Return <- diff --git a/R/b2ListFileVersions.R b/R/b2ListFileVersions.R index ccaeebc..6b07a00 100644 --- a/R/b2ListFileVersions.R +++ b/R/b2ListFileVersions.R @@ -66,6 +66,8 @@ b2ListFileVersions <- # Bind function option data frames together vars <- cbind(bucketId, startFileName, startFileId, maxFileCount) + # Remove empty values + vars <- vars[, colSums(vars != "") != 0] # API call b2Return <- diff --git a/R/b2UploadFile.R b/R/b2UploadFile.R index df8bc65..25418c1 100644 --- a/R/b2UploadFile.R +++ b/R/b2UploadFile.R @@ -53,8 +53,8 @@ b2UploadFile <- function(authToken, uploadUrl, fileName) { # Get file extension fileNameExtension <- tools::file_ext(fileName) # File Types List - b2FileTypes <- system.file("extdata", "b2FileTypes.rds", package = "backblazer") - b2FileTypes <- readRDS(b2FileTypes) + b2FileTypesLocation <- system.file("extdata", "b2FileTypes.rds", package = "backblazer") + b2FileTypes <- readRDS(b2FileTypesLocation) b2ContentType <- b2FileTypes$contentType[grepl(fileNameExtension, b2FileTypes$fileExtension) == TRUE]