From d9646dfcbb4cca77907dc02ab2c2f483e086ef81 Mon Sep 17 00:00:00 2001 From: Luke Zappia Date: Wed, 18 Dec 2024 09:31:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Adjust=20settings=20directory=20?= =?UTF-8?q?path=20for=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/settings_store.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/settings_store.R b/R/settings_store.R index 5289427..8a3e5a9 100644 --- a/R/settings_store.R +++ b/R/settings_store.R @@ -7,7 +7,12 @@ if (settings_dir != "") { file.path(settings_dir, ".lamin") } else { - file.path(Sys.getenv("HOME"), ".lamin") + if (.Platform$OS.type == "windows") { + home_dir <- paste0(Sys.getenv("HOMEDRIVE"), Sys.getenv("HOMEPATH")) + } else { + home_dir <- Sys.getenv("HOME") + } + file.path(home_dir, ".lamin") } }