Skip to content

Commit

Permalink
Fix copy fallback of #1103
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Aug 10, 2023
1 parent aea5e9e commit c999968
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Description: Pipeline tools coordinate the pieces of computationally
The methodology in this package
borrows from GNU 'Make' (2015, ISBN:978-9881443519)
and 'drake' (2018, <doi:10.21105/joss.00550>).
Version: 1.2.2
Version: 1.2.2.9000
License: MIT + file LICENSE
URL: https://docs.ropensci.org/targets/, https://github.com/ropensci/targets
BugReports: https://github.com/ropensci/targets/issues
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# targets 1.2.2.9000

* Fix solution of #1103 so the copy fallback actually runs (@jds485, #1102, #1103).

# targets 1.2.2

* Fix a documentation issue for CRAN.
Expand Down
11 changes: 3 additions & 8 deletions R/utils_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,10 @@ file_info_runtime_select <- function(info, x) {
}

file_move <- function(from, to) {
tryCatch(
file.rename(from = from, to = to),
if (!suppressWarnings(file.rename(from = from, to = to))) {
# Not feasible to test:
# nocov start
error = function(condition) {
file.copy(from = from, to = to, overwrite = TRUE)
unlink(from)
}
# nocov end
)
file.copy(from = from, to = to, overwrite = TRUE)
}
invisible()
}

0 comments on commit c999968

Please sign in to comment.