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

Difficulty creating a directory on mapped network drive #223

Open
jennybc opened this issue Oct 1, 2019 · 0 comments
Open

Difficulty creating a directory on mapped network drive #223

jennybc opened this issue Oct 1, 2019 · 0 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@jennybc
Copy link
Member

jennybc commented Oct 1, 2019

Discovered while working on usethis.

I'm working in a project on a folder shared between a Windows VM guest and the macOS host.

fs can recursively add folders there, but not if the UNC path is used. It can list directory contents with such a path.

setwd("Z:/win10/frommacos")
getwd()
#> [1] "Z:/win10/frommacos"

library(usethis)
#> Warning: package 'usethis' was built under R version 3.6.1
library(fs)

proj_get()
#> <U+2714> Setting active project to '//vmware-host/Shared Folders/win10/frommacos'
#> //vmware-host/Shared Folders/win10/frommacos
proj_sitrep()
#> *   working_directory: 'Z:/win10/frommacos'
#> * active_usethis_proj: '//vmware-host/Shared Folders/win10/frommacos'
#> * active_rstudio_proj: <unset>
#> <U+25CF> Your working directory is not the same as the active usethis project.
#>   Set working directory to the project: `setwd(proj_get())`
#>   Set project to working directory:     `proj_set(getwd())`

dir_create("top_folder/subfolder")

proj_path()
#> //vmware-host/Shared Folders/win10/frommacos
dir_ls(proj_path())
#> //vmware-host/Shared Folders/win10/frommacos/R
#> //vmware-host/Shared Folders/win10/frommacos/top_folder
#> //vmware-host/Shared Folders/win10/frommacos/NAMESPACE
#> //vmware-host/Shared Folders/win10/frommacos/frommacos.Rproj
#> //vmware-host/Shared Folders/win10/frommacos/reprex.R
#> //vmware-host/Shared Folders/win10/frommacos/DESCRIPTION

proj_path("even_more/subfolder")
#> //vmware-host/Shared Folders/win10/frommacos/even_more/subfolder
dir_create(proj_path("even_more/subfolder"))
#> Error: [ENOENT] Failed to make directory '//vmware-host/Shared Folders': no such file or directory

dir_delete("top_folder")

Created on 2019-10-01 by the reprex package (v0.3.0.9000)

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