Skip to content

Commit 70e6cb8

Browse files
committed
fix setwd problem when sourceCpp used a relative path and included an R code chunk
1 parent 60d31de commit 70e6cb8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-06-29 JJ Allaire <jj@rstudio.org>
2+
3+
* R/Attributes.R: fix setwd problem when sourceCpp used a
4+
relative path and included an R code chunk
5+
16
2014-06-20 Dirk Eddelbuettel <edd@debian.org>
27

38
* include/Rcpp/sugar/functions/ifelse.h: Applied pull request #150 by

R/Attributes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sourceCpp <- function(file = "",
3434
writeLines(code, con)
3535
close(con)
3636
} else {
37-
rWorkingDir <- dirname(file)
37+
rWorkingDir <- normalizePath(dirname(file))
3838
}
3939

4040
# resolve the file path

0 commit comments

Comments
 (0)