From a2e319ee7f1331407d6c78b4a476ae10c0b010bc Mon Sep 17 00:00:00 2001 From: eanslot Date: Thu, 22 Jan 2026 16:48:33 +0100 Subject: [PATCH 1/2] copy files without inheriting read/write/execute permissions --- R/file_cache.R | 4 ++-- R/layers.R | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/file_cache.R b/R/file_cache.R index 317aa5ee..6811b988 100644 --- a/R/file_cache.R +++ b/R/file_cache.R @@ -194,7 +194,7 @@ FileCache <- R6::R6Class("FileCache", cache_file <- private$filename_full_path(key) - if (file.copy(cache_file, outfile, overwrite = overwrite)) { + if (file.copy(cache_file, outfile, overwrite = overwrite, copy.mode = FALSE)) { private$log(paste0('get: key "', key, '" found and copied to ', outfile)) if (private$evict == "lru"){ Sys.setFileTime(cache_file, Sys.time()) @@ -264,7 +264,7 @@ FileCache <- R6::R6Class("FileCache", cache_file <- private$filename_full_path(key) - success <- file.copy(infile, cache_file, overwrite = TRUE) + success <- file.copy(infile, cache_file, overwrite = TRUE, copy.mode = FALSE) if (success) { private$log(paste0('set: key "', key, ' from file ', infile)) } else { diff --git a/R/layers.R b/R/layers.R index ea554721..31ee180a 100644 --- a/R/layers.R +++ b/R/layers.R @@ -479,7 +479,8 @@ write_file_attachments <- function(file_attachments, output_path) { dir(src, all.files = TRUE, full.names = TRUE, no.. = TRUE), dest, overwrite = TRUE, - recursive = TRUE + recursive = TRUE, + copy.mode = FALSE ) return(NULL) } From 7dd3aca7c4895e66cb01f337b18ccda5431d3929 Mon Sep 17 00:00:00 2001 From: eanslot Date: Fri, 23 Jan 2026 17:03:33 +0100 Subject: [PATCH 2/2] update NEWS.md --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 20853860..e8cc519b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # sass (development version) - Fixed throwing exceptions when running under Emscripten. +- Copy files without inheriting read/write/execute permissions fixing issues when using sass on immutable operating systems. # sass 0.4.10