[FIX] Логгирование места, куда загружатся обновления

This commit is contained in:
Gravit 2019-05-21 00:53:33 +07:00
parent af5d99aa0b
commit 1b80f4f7aa

View file

@ -51,13 +51,14 @@ public void download(String base, List<DownloadTask> applies, Path dstDirFile, D
for (DownloadTask apply : applies) { for (DownloadTask apply : applies) {
URI u = new URL(base.concat(IOHelper.urlEncode(apply.apply).replace("%2F", "/"))).toURI(); URI u = new URL(base.concat(IOHelper.urlEncode(apply.apply).replace("%2F", "/"))).toURI();
callback.stateChanged(apply.apply, 0L, apply.size); callback.stateChanged(apply.apply, 0L, apply.size);
LogHelper.debug("Download URL: %s", u.toString()); Path targetPath = dstDirFile.resolve(apply.apply);
LogHelper.debug("Download URL: %s to file %s dir: %s", u.toString(), targetPath.toAbsolutePath().toString(), dstDirFile.toAbsolutePath().toString());
if (get == null) get = new HttpGet(u); if (get == null) get = new HttpGet(u);
else { else {
get.reset(); get.reset();
get.setURI(u); get.setURI(u);
} }
httpclient.execute(get, new FileDownloadResponseHandler(dstDirFile.resolve(apply.apply), apply, callback, totalCallback, false)); httpclient.execute(get, new FileDownloadResponseHandler(targetPath, apply, callback, totalCallback, false));
} }
} }
} }