Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
atusy committed Dec 15, 2020
1 parent e004deb commit 8d756f2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ render <- function(input,
if (!dir_exists(intermediates_dir))
dir.create(intermediates_dir, recursive = TRUE)
intermediates_dir <- normalize_path(intermediates_dir)
} else {
intermediates_dir <- normalize_path(dirname(input))
}
intermediates_loc <- function(file) {
if (is.null(intermediates_dir))
Expand Down Expand Up @@ -364,12 +366,6 @@ render <- function(input,
file.copy(input, input_no_shell_chars, overwrite = TRUE)
intermediates <- c(intermediates, input_no_shell_chars)
input <- input_no_shell_chars

# if an intermediates directory wasn't explicit before, make it explicit now
if (is.null(intermediates_dir)) {
intermediates_dir <-
dirname(normalize_path(input_no_shell_chars))
}
}

# never use the original input directory as the intermediate directory,
Expand Down

0 comments on commit 8d756f2

Please sign in to comment.