diff --git a/R/auxiliary.R b/R/auxiliary.R index 21b6a1de80457044b011fbd5b211bb67a2183ff8..75d6b67ac37194ed759bcba9c2e896f428a9600b 100644 --- a/R/auxiliary.R +++ b/R/auxiliary.R @@ -592,7 +592,11 @@ getDownloadSize <- function(URLVector){ filesizes <- sum(filesizes,fileISize) # return(Downloadsize) } - availDiscSpaceMB <- as.numeric(stringr::str_remove(base::system("wmic logicaldisk get freespace", inter=TRUE)[2], pattern = " \r"))/1024/1024 + if(Sys.info()[names(Sys.info()) == "sysname"] == "Windows"){ + availDiscSpaceMB <- as.numeric(stringr::str_remove(base::system("wmic logicaldisk get freespace", inter=TRUE)[2], pattern = " \r"))/1024/1024 + } + # else if(Sys.info()[names(Sys.info()) == "sysname"] != "Windows"){ + # } # if(availDiscSpaceMB < round(filesizes*0.000001, 2)){ # print(paste0(round(filesizes*0.000001, 2),"MB will be downloaded. These is only ", availDiscSpaceMB, "MB available. Please consider another download location.")) # }