Skip to content

Commit 21f255b

Browse files
authored
Fixes 192: Use file.copy for cross-disk flexibility in HYDAT download
Replaced file.rename with file.copy to handle situations where the temp folder and the destination are on different physical disks (e.g. Docker container with different mount points for the tempdir and the destination).
1 parent af345e4 commit 21f255b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/download.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ download_hydat <- function(dl_hydat_here = NULL, ask = TRUE) {
121121
on.exit(unlink(tempdir, recursive = TRUE))
122122

123123
## Move to final resting place and rename to consistent name
124-
file.rename(
124+
file.copy(
125125
list.files(tempdir, pattern = "\\.sqlite3$", full.names = TRUE),
126126
hydat_path
127127
)

0 commit comments

Comments
 (0)