Skip to content

Commit b6a750d

Browse files
fix calculation of temp_dir in delete_if_cache_directory()
close #1125
1 parent aeaa1fa commit b6a750d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ delete_if_cache_directory <- function(path) {
3838
}
3939
designated_cache_path <- normalizePath(tools::R_user_dir("R.cache", which = "cache"))
4040
is_in_tools_cache <- startsWith(path, designated_cache_path)
41-
temp_dir <- normalizePath(Sys.getenv("TMPDIR", Sys.getenv("TMP")))
41+
temp_dir <- normalizePath(dirname(tempdir()))
4242
is_in_generic_cache <- startsWith(path, temp_dir)
4343
if (is_in_tools_cache || is_in_generic_cache) {
4444
all_files <- list.files(path,

0 commit comments

Comments
 (0)