From fdd720512d72e2bf4b6fa249359e7b877b1c546c Mon Sep 17 00:00:00 2001 From: Simon Guest Date: Tue, 26 Nov 2024 01:45:03 +1300 Subject: [PATCH] Readonly file io error (#1346) * Copy cpp source with copy.mode = false Fixes #1345 * Add to ChangeLog * Fix ChangeLog formatting --------- Co-authored-by: Simon Guest --- ChangeLog | 4 ++++ src/attributes.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 219b3ad0b..dc08c3852 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-11-25 Simon Guest + + * src/attributes.cpp: fix CPP source having to be writable + 2024-11-03 Marco Colombo * vignettes/rmd/Rcpp-FAQ.Rmd: Fixed typos diff --git a/src/attributes.cpp b/src/attributes.cpp index 4dfbdbfeb..33f3459c3 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -3279,7 +3279,7 @@ namespace { // copy the source file to the build dir Rcpp::Function filecopy = Rcpp::Environment::base_env()["file.copy"]; - filecopy(cppSourcePath_, generatedCppSourcePath(), true); + filecopy(cppSourcePath_, generatedCppSourcePath(), true, Rcpp::_["copy.mode"] = false); // parse attributes SourceFileAttributesParser sourceAttributes(cppSourcePath_, "", true);