From 4b3c63b81ade5441802f224370d4b50932630acc Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Wed, 21 Feb 2024 09:19:53 -0800 Subject: [PATCH] scope workaround to Windows --- R/files.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/files.R b/R/files.R index 3195e15e7..028e51f70 100644 --- a/R/files.R +++ b/R/files.R @@ -314,8 +314,10 @@ renv_file_same <- function(source, target) { # NOTE: we intentionally exclude 'size' for directories, as # on Windows the 'size' field might be reported as 0 for # junction points? - if (sinfo$isdir || tinfo$isdir) - sinfo$size <- tinfo$size <- 0L + if (renv_platform_windows()) { + if (sinfo$isdir || tinfo$isdir) + sinfo$size <- tinfo$size <- 0L + } identical(c(sinfo), c(tinfo))