mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] Логгирование места, куда загружатся обновления
This commit is contained in:
parent
af5d99aa0b
commit
1b80f4f7aa
1 changed files with 3 additions and 2 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue