Skip to content

Commit ea087aa

Browse files
committed
Fix failing local include test
1 parent e0b8e83 commit ea087aa

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2015-03-16 JJ Allaire <[email protected]>
2+
3+
* src/attributes.cpp: Fix failing local include test (normalize path of
4+
base source file so comparisons work on Windows).
5+
16
2015-03-15 Dirk Eddelbuettel <[email protected]>
27

38
* R/Attributes.R (.rtoolsPath): Replace trimws() use with a local variant

src/attributes.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,13 @@ namespace attributes {
883883

884884
// parse the source dependencies from the passed lines
885885
std::vector<FileInfo> parseSourceDependencies(
886-
const std::string& sourceFile) {
886+
std::string sourceFile) {
887887

888+
// normalize source file
889+
Rcpp::Environment baseEnv = Rcpp::Environment::base_env();
890+
Rcpp::Function normalizePath = baseEnv["normalizePath"];
891+
sourceFile = Rcpp::as<std::string>(normalizePath(sourceFile));
892+
888893
// parse dependencies
889894
std::vector<FileInfo> dependencies;
890895
parseSourceDependencies(sourceFile, &dependencies);

0 commit comments

Comments
 (0)