Skip to content

Commit

Permalink
Fix empty optional params for b2ListFileNames & b2ListFileVersions
Browse files Browse the repository at this point in the history
  • Loading branch information
phillc73 committed Jan 27, 2016
1 parent 9af1ece commit 4a2d7d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions R/b2ListFileNames.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <-
Expand Down
2 changes: 2 additions & 0 deletions R/b2ListFileVersions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <-
Expand Down
4 changes: 2 additions & 2 deletions R/b2UploadFile.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 4a2d7d5

Please sign in to comment.