From 01f426117dbb867f0204738f4443ca436b3a3a89 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sat, 10 Jun 2023 16:00:17 -0700 Subject: [PATCH] avoid warning when missing R cache dir --- R/zzz.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/zzz.R b/R/zzz.R index 77b90ee17..9bdc76c48 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -36,7 +36,7 @@ delete_if_cache_directory <- function(path) { if (getRversion() < package_version("4.0.0")) { return(FALSE) } - designated_cache_path <- normalizePath(tools::R_user_dir("R.cache", which = "cache")) + designated_cache_path <- normalizePath(tools::R_user_dir("R.cache", which = "cache"), mustWork = FALSE) is_in_tools_cache <- startsWith(path, designated_cache_path) temp_dir <- normalizePath(dirname(tempdir())) is_in_generic_cache <- startsWith(path, temp_dir)