Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ is_string <- function(x) {
}

is_character <- function(x) {
is.character(x) && !any(is.na(x))
is.character(x) && !anyNA(x)
}

is_character_or_null <- function(x) {
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ warn_for_colon <- function(files) {
}

fix_absolute_paths <- function(files) {
if (any(substr(files, 1, 1) == "/")) {
if (any(startsWith(files, "/"))) {
warning("Dropping leading `/` from paths, all paths in a zip file ",
"must be relative paths.")
files <- sub("^/", "", files)
Expand Down
2 changes: 1 addition & 1 deletion R/zip.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ zip_internal <- function(zipfile, files, recurse, compression_level,
oldwd <- setwd(root)
on.exit(setwd(oldwd), add = TRUE)

if (any(! file.exists(files))) stop("Some files do not exist")
if (!all(file.exists(files))) stop("Some files do not exist")

data <- get_zip_data(files, recurse, keep_path, include_directories)
data$key <- fix_absolute_paths(data$key)
Expand Down
Loading