diff --git a/DESCRIPTION b/DESCRIPTION index 245b9bb..64042d9 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: yamlme -Version: 0.1.2.9001 +Version: 0.1.3 Encoding: UTF-8 Title: Writing 'YAML' Headers for 'R-Markdown' Documents Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 3740cfd..0450556 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# yamlme 0.1.3 +# yamlme 0.2.0 ### Bug Fixes @@ -6,7 +6,6 @@ files. - # yamlme 0.1.2 ### Improvements diff --git a/R/render_rmd.R b/R/render_rmd.R index 7378ba4..6768bc8 100755 --- a/R/render_rmd.R +++ b/R/render_rmd.R @@ -82,8 +82,10 @@ render_rmd.rmd_doc <- function(input, output_file, delete_rmd = TRUE, ...) { if (delete_rmd) { files_tmp <- files_tmp[!grepl(".Rmd", files_tmp, fixed = TRUE)] } - file.copy( - from = file.path(tempdir(), files_tmp), to = dirname(output_file), - overwrite = TRUE - ) + if (dirname(output_file) != tempdir()) { + file.copy( + from = file.path(tempdir(), files_tmp), to = dirname(output_file), + overwrite = TRUE + ) + } }