miniCRAN icon indicating copy to clipboard operation
miniCRAN copied to clipboard

unc filepaths not working

Open jd4ds opened this issue 5 years ago • 1 comments

hello,

I’m experiencing some issues when trying to addLocalPackage to a repository on a unc file path like so

  • \\\\\\\\fileserver\\\\dir\\\\minicran\\\\, or
  • file.path('', '', 'fileserver', 'dir', 'minicran'), or
  • //fileserver/dir/minicran/

it looks like that at least at one point in the code in the repoBinPath() function the normalization of the path does not work properly (maybe somewhere else as well) and converts the path to \\\fileserver/dir/minicran which tar() does not interpret correctly.

tar (child): \\\fileserver/dir/minicran/src/contrib/testpackage_0.1.0.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/bin/tar: Child returned status 2
/usr/bin/tar: testpackage/DESCRIPTION: Not found in archive
/usr/bin/tar: Exiting with failure status due to previous errors
- Session info -----------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       Windows >= 8 x64            
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  German_Germany.1252         
 ctype    German_Germany.1252         
 tz       Europe/Berlin               
 date     2019-01-08                  

- Packages ---------------------------------------------------------------------------------------------------------------------------
 package  * version date       lib source        
 miniCran   0.2.11  2018-01-15 [1] CRAN (R 3.5.1)

[1] C:/Users/user/Documents/R/win-library/3.5
[2] c:/Program Files/R/R-3.5.1/library

cheers, janis

jd4ds avatar Jan 08 '19 09:01 jd4ds

Same Problem here:

miniCRAN::addLocalPackage(pkgs="mycomp.ABCde.Tools", pkgPath="../", path=file.path("//myserver/localrepo/miniCRAN"))
tar (child): \\myserver/localrepo/miniCRAN/src/contrib/mycomp.ABCde.Tools_0.0.0.9000.tar.gz: Cannot open: No such file or directory

R version 3.5.2

Because of this bug, Windows users can only use miniCRAN repositories on the local computer.

de-mim-1974 avatar Sep 28 '20 14:09 de-mim-1974