Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with real_path on mapped network drive #296

Open
philippbayer opened this issue Sep 18, 2020 · 1 comment
Open

Issue with real_path on mapped network drive #296

philippbayer opened this issue Sep 18, 2020 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@philippbayer
Copy link

philippbayer commented Sep 18, 2020

Hi

Having an issue discussed originally in workflowr/workflowr#219 which looks similar, but not identical to #223

Under Windows on network-mounted drives, path_real() triggers an Illegal Operation, using both the fs version from Github and via CRAN.

Minimal example:

> library(fs)
> path_wd()
//uniwa.uwa.edu.au/userhome/staff3/<STAFFID>/My Documents
> dir_create("testDir")
> dir_exists("testDir")
testDir 
   TRUE 
> path_real("testDir")
Error: [EISDIR] Failed to realize 'testDir': illegal operation on a directory
> dir_delete("testDir")

and a traceback:

> path_real('testDir')
Error: [ENOENT] Failed to realize 'testDir': no such file or directory
> traceback()
2: (function (..., call. = TRUE, domain = NULL) 
   {
       args <- list(...)
       if (length(args) == 1L && inherits(args[[1L]], "condition")) {
           cond <- args[[1L]]
           if (nargs() > 1L) 
               warning("additional arguments ignored in stop()")
           message <- conditionMessage(cond)
           call <- conditionCall(cond)
           .Internal(.signalCondition(cond, message, call))
           .Internal(.dfltStop(message, call))
       }
       else .Internal(stop(call., .makeMessage(..., domain = domain)))
   })(list(message = "[ENOENT] Failed to realize 'testDir': no such file or directory"))
1: path_real("testDir")

SessionInfo:

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 
locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] fs_1.5.0.9000

loaded via a namespace (and not attached):
 [1] compiler_3.6.3  magrittr_1.5    ellipsis_0.3.1  tools_3.6.3     pillar_1.4.4    rstudioapi_0.11 tibble_3.0.2    yaml_2.2.1      crayon_1.3.4   
[10] vctrs_0.3.1     lifecycle_0.2.0 pkgconfig_2.0.3 rlang_0.4.6 
@gaborcsardi
Copy link
Member

gaborcsardi commented Dec 8, 2021

Most likely the file system does not support this operation, so there is little that fs can do here. Nevertheless I'll take a look at this at the next major fs release, in a couple of months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants