diff --git a/DESCRIPTION b/DESCRIPTION index 17c61e15d..8622968ef 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: bookdown Type: Package Title: Authoring Books and Technical Documents with R Markdown -Version: 0.36.1 +Version: 0.36.2 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Christophe", "Dervieux", , "cderv@posit.co", role = c("ctb"), diff --git a/NEWS.md b/NEWS.md index 16af2ebd5..3e800e4cc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ - Custom config files passed to the `config_file` argument of `render_book()` are no longer temporarily renamed to `_bookdown.yml` (thanks, @debruine, #1307). +- Do not move all `_files` directories temporarily to the `_bookdown_files` directory when calling `render_book()` (thanks, @steeleb, #1307). + # CHANGES IN bookdown VERSION 0.36 - Fix an issue with parsing resources from raw HTML code (thanks, @lennylin, https://community.rstudio.com/t/bookdown-image-with-a-weblink/172542) diff --git a/R/utils.R b/R/utils.R index 10ebebd43..b23a09dfb 100644 --- a/R/utils.R +++ b/R/utils.R @@ -448,8 +448,11 @@ base64_css = function(css, exts = 'png', overwrite = FALSE) { files_cache_dirs = function(dir = '.') { if (!dir_exists(dir)) return(character()) - out = list.files(dir, '_(files|cache)$', full.names = TRUE) + r = '_(files|cache)$' + out = list.files(dir, r, full.names = TRUE) out = out[dir_exists(out)] + # only use dirs that have corresponding Rmd files + if (dir == '.') out = out[file.exists(sub(r, '.Rmd', out))] out = out[basename(out) != '_bookdown_files'] out }