Skip to content

Commit cedaac9

Browse files
committed
only move _files/_cache dirs that have corresponding Rmd files
this should fix the problem reported at #1307 (comment), in which case config_files was moved by mistake
1 parent a0ef873 commit cedaac9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bookdown
22
Type: Package
33
Title: Authoring Books and Technical Documents with R Markdown
4-
Version: 0.36.1
4+
Version: 0.36.2
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("Christophe", "Dervieux", , "cderv@posit.co", role = c("ctb"),

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
- Custom config files passed to the `config_file` argument of `render_book()` are no longer temporarily renamed to `_bookdown.yml` (thanks, @debruine, #1307).
44

5+
- Do not move all `_files` directories temporarily to the `_bookdown_files` directory when calling `render_book()` (thanks, @steeleb, #1307).
6+
57
# CHANGES IN bookdown VERSION 0.36
68

79
- Fix an issue with parsing resources from raw HTML code (thanks, @lennylin, https://community.rstudio.com/t/bookdown-image-with-a-weblink/172542)

R/utils.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,11 @@ base64_css = function(css, exts = 'png', overwrite = FALSE) {
448448

449449
files_cache_dirs = function(dir = '.') {
450450
if (!dir_exists(dir)) return(character())
451-
out = list.files(dir, '_(files|cache)$', full.names = TRUE)
451+
r = '_(files|cache)$'
452+
out = list.files(dir, r, full.names = TRUE)
452453
out = out[dir_exists(out)]
454+
# only use dirs that have corresponding Rmd files
455+
if (dir == '.') out = out[file.exists(sub(r, '.Rmd', out))]
453456
out = out[basename(out) != '_bookdown_files']
454457
out
455458
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy