Skip to content

Commit

Permalink
Fix codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Jul 26, 2024
1 parent 5ea0ceb commit c2431d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions R/outpack_root.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ file_export <- function(root, id, there, here, dest, overwrite, call = NULL) {
})
}

# Set copy.mode = FALSE: files in the archive are read-only. It's easier on
# Set copy_mode = FALSE: files in the archive are read-only. It's easier on
# the user if we make them writable again.
copy_files(there_full, here_full, overwrite = overwrite, copy.mode = FALSE)
copy_files(there_full, here_full, overwrite = overwrite, copy_mode = FALSE)
}
}

Expand Down
4 changes: 2 additions & 2 deletions R/outpack_store.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ file_store <- R6::R6Class(
}
fs::dir_create(dirname(dst))

# Set copy.mode = FALSE: files in the store are read-only. It's easier on
# Set copy_mode = FALSE: files in the store are read-only. It's easier on
# the user if we make them writable again.
copy_files(src, dst, overwrite = overwrite, copy.mode = FALSE)
copy_files(src, dst, overwrite = overwrite, copy_mode = FALSE)

invisible(dst)
},
Expand Down
4 changes: 2 additions & 2 deletions R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ expand_dirs <- function(paths, workdir) {


copy_files <- function(src, dst, overwrite = FALSE,
copy.mode = TRUE) {
copy_mode = TRUE) {
fs::dir_create(unique(dirname(dst)))

# mrc-5557: We intentionally don't use fs::file_copy, as it does not work
# reliably on mounted Samba file systems.
ok <- file.copy(src, dst, overwrite = overwrite, copy.mode = copy.mode)
ok <- file.copy(src, dst, overwrite = overwrite, copy.mode = copy_mode)
if (any(!ok)) {
cli::cli_abort("Could not copy file{?s} {.file {src[!ok]}}")
}
Expand Down

0 comments on commit c2431d9

Please sign in to comment.