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)