From 696d664705d27b1c774da2d164715b5df7ec1002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=BB=C3=B3=C5=82tak?= Date: Fri, 26 Apr 2019 21:46:48 +0200 Subject: [PATCH] Minor fix --- R/S2_download.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/S2_download.R b/R/S2_download.R index d3c320b..f8bc9be 100644 --- a/R/S2_download.R +++ b/R/S2_download.R @@ -102,10 +102,10 @@ S2_download = function(url, destfile, zip = TRUE, skipExisting = TRUE, progressB success[i] = TRUE }, warning = function(w) { - if (file.exists(destfile[i])) { - unlink(destfile[i]) - } if (all(w$message == 'Operation was aborted by an application callback')) { + if (file.exists(destfile[i])) { + unlink(destfile[i]) + } breakLoop <<- TRUE } },