r-lib / rprojroot

Finding files in project subdirectories
https://rprojroot.r-lib.org/
Other
149 stars 23 forks source link

here(NA) treats NA as "NA" #66

Closed moodymudskipper closed 3 years ago

moodymudskipper commented 4 years ago

I would expect the output of here::here(NA) to be NA, or maybe the same as here::here(), but not a path ending with the characters "NA"..

krlmlr commented 3 years ago

This will need importing fs to replace file.path() by fs::path() .

krlmlr commented 3 years ago

I wonder if we should throw an error if one of the inputs is NA?

krlmlr commented 3 years ago

Interestingly, NA -> "NA" doesn't seem to be documented in ?file.path . This could also be fixed upstream, I wouldn't hold my breath though.

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.