Skip to content

Commit e8836fd

Browse files
Merge pull request #1126 from 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q/fix/#1125
fix calculation of temp_dir in delete_if_cache_directory()
2 parents aeaa1fa + b6a750d commit e8836fd

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)