Skip to content

Commit

Permalink
Added extra & of bib.loc line so that if the first argument does not …
Browse files Browse the repository at this point in the history
…occur R will not attempt the second.
  • Loading branch information
tyler rinker committed Feb 25, 2013
1 parent ae59ae7 commit c5d759b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/new_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ new_report <- function(report = "report", template = "apa6.mod.qual_tex",
paste0("source(\"", rpro3, "\")"))
}
bib <- NULL
if(!is.null(bib.loc) & file.exists(bib.loc)){
if(!is.null(bib.loc) && file.exists(bib.loc)){
invisible(file.copy(bib.loc, y[[1]]))
invisible(file.copy(bib.loc, y[[4]]))
bib <- dir(y[[1]])[tools::file_ext(dir(y[[1]])) == "bib"]
Expand Down
2 changes: 1 addition & 1 deletion R/presentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ presentation <- function(presentation = "presentation", rnw = TRUE,
invisible(file.copy(file.path(root, "TEMP.txt"), x))
invisible(file.rename(file.path(x, "TEMP.txt"),
file.path(x, paste0(presentation, ".Rproj"))))
if(!is.null(bib.loc) & file.exists(bib.loc)){
if(!is.null(bib.loc) && file.exists(bib.loc)){
invisible(file.copy(bib.loc, y[[2]]))
bib <- dir(y[[2]])[tools::file_ext(dir(y[[2]])) == "bib"]
if (!is.null(getOption("bib.loc"))) {
Expand Down

0 comments on commit c5d759b

Please sign in to comment.