diff --git a/NEWS.md b/NEWS.md index 2085386..e8cc519 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 diff --git a/R/file_cache.R b/R/file_cache.R index 317aa5e..6811b98 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 ea55472..31ee180 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) }