Skip to content

Commit eb2411f

Browse files
author
Stefan Fleck
committed
loop over paths when setting mtime, because Sys.setFileTime was only vectorized in R 3.6.0
1 parent e129fd0 commit eb2411f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/testthat/test_Cache.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ test_that("pruning works by number of files sorts by key if timestamp are identi
108108
k3 <- cache$push(cars)
109109
expect_identical(cache$n, 3L)
110110

111-
Sys.setFileTime(cache$files$path, "1999-01-01 00:00:00")
111+
for (p in cache$files$path){ # loop necessary for compat with R < 3.6.0
112+
Sys.setFileTime(p, "1999-01-01 00:00:00")
113+
}
112114

113115
expect_identical(cache$files$key[[1]], k1)
114116
expect_identical(cache$files$key[[2]], k2)

0 commit comments

Comments
 (0)