miniCRAN icon indicating copy to clipboard operation
miniCRAN copied to clipboard

UpdatePackages function with UNC paths

Open leemhmark opened this issue 2 years ago • 1 comments

Hello,

Can the UpdatePackages() function take UNC paths as its path perimeter? I tried to pass a UNC path this way:

path = '\\\\sample-location.net\\repo;
updatePackages(path = path, ...)

It always gives me this error:

Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning message:
In read.dcf(file = tmpf) :
  cannot open compressed file '/\\sample-location.net/repo/cran/bin/windows/contrib/3.5/PACKAGES', probable reason 'No such file or directory'

However if I map the network drive location \\sample-location.net to a drive (eg, Z:) and use the drive as the path the function would work:

path = Z:\\repo;
updatePackages(path = path, ...)`

I'm trying to automate this script using a scheduler and it requires all paths in the script to be called using UNC paths, so I need to figure out whether this function can work with UNC paths at all.

leemhmark avatar Mar 28 '22 21:03 leemhmark