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

here often fails to identify directory on google drive on windows #75

Open
rjm001 opened this issue Jul 30, 2021 · 3 comments
Open

here often fails to identify directory on google drive on windows #75

rjm001 opened this issue Jul 30, 2021 · 3 comments

Comments

@rjm001
Copy link

rjm001 commented Jul 30, 2021

Hello, I am having trouble with here() on my windows 10 machine. I believe the problem stems from my use of it with google drive. The package and R are both up to date. I am using r studio. When I run a "here()" call from my google drive files, here often fails to find my project folder. Instead, it starts looking for a project in my C drive. This is even if I restart my r session and only have files from my google drive folder open. It's strange, because if I right-click the file and ask Rstudio to "copy path" for the file, it correctly identifies the google drive location. However, if I then run here::here() from the file, it spits out an entirely different and incorrect location. Any suggestions as to what the issue might be? Thanks!

@m-r-andersson
Copy link

I have similar problems using network drives on windows. If I'm in an R-project with the .Rproj-file located in a folder on a network drive, and if I have initialized the project so that my working directory is the same folder (say by opening an r-script in that folder), and run here::here() and getwd(), I get different results.

I can do read operations using here::here() to create paths, like sourcing scripts or reading data files from subfolders, but write operations fail.

@krlmlr
Copy link
Member

krlmlr commented Mar 16, 2022

Thanks. What's the output of here::dr_here() ?

@m-r-andersson
Copy link

m-r-andersson commented Mar 17, 2022

Thanks for replying.

Before moving on, let me just say I've just started using here, I'm still learning it and could definitely be doing something wrong. That being said, I've added output of here::dr_here() below. I created the output when I was in an R-project located on a network drive belonging to a company.

here::dr_here()
#> - here() starts at \\srvwinfs01.my-company-network/GemSrv01Data02$/A00007584/projects/my-project.
#> - This directory contains a file matching "[.]Rproj$" with contents matching "^Version: " in the first line
#> - Initial working directory: \\my-company-network/dfs/shared/R/projects/my-project
#> - Current working directory: \\my-company-network/dfs/shared/R/projects/my-project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants