String dir = parentDir;
if (path.contains("..") || path.startsWith("/") || path.contains(":")) {
return; // some basic protection
}
File fOut = new File(dir, path);
DownloadFileTask downloadFileTask = new DownloadFileTask(Main.parent, address, fOut, mkdir, unzip);
Main.worker.submit(downloadFileTask);
log("Info: downloading file from %s to %s in background ", parentDir, fOut.getAbsolutePath());
if (unzip) log("and unpacking it"); else log("");