Skip to content

Commit

Permalink
Check for UNC paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ateucher committed Jan 10, 2019
1 parent a31bf0a commit 7532426
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ path relative to the SOE root folder (e.g. Operations ORCS/indicators/air/.")
#' set_soe_root("P:/pickaxe/SOE")
#' }
set_soe_root <- function(x) {
if (.Platform$OS.type == "windows" && grepl("\\\\", x)) {
stop("It looks like you are trying to set your SOE path as a UNC path
(path beginning with \\. Please use the mapped drive letter (E.g., P:/etc).",
call. = FALSE)
}
home_dir <- Sys.getenv("HOME")
renviron_file <- file.path(home_dir, ".Renviron")
renviron_lines <- readLines(renviron_file)
Expand Down

0 comments on commit 7532426

Please sign in to comment.