Skip to content

Commit

Permalink
try file.symlink?
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Jun 23, 2023
1 parent 0f98595 commit 8735bfa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions R/hub_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,8 @@ hub_download <- function(repo_id, filename, ..., revision = "main", repo_type =
})
fs::file_move(tmp, blob_path)

if (!fs::file_access(blob_path, mode = "read")) {
fs::file_chmod(blob_path, mode = "u+r")
}

fs::link_create(blob_path, pointer_path)
# fs::link_create doesn't work for linking files on windows.
file.symlink(blob_path, pointer_path)
})

pointer_path
Expand Down

0 comments on commit 8735bfa

Please sign in to comment.