mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fix error when downloading new skins.
This commit is contained in:
parent
fbd7528993
commit
95107ddeed
1 changed files with 1 additions and 0 deletions
|
@ -190,6 +190,7 @@ public class ThreadDownloadImageETag extends SimpleTexture {
|
||||||
try (MoreHttpResponses resp = MoreHttpResponses.execute(client, new HttpGet(imageUrl))) {
|
try (MoreHttpResponses resp = MoreHttpResponses.execute(client, new HttpGet(imageUrl))) {
|
||||||
if (resp.ok()) {
|
if (resp.ok()) {
|
||||||
// write the image to disk
|
// write the image to disk
|
||||||
|
Files.createDirectories(cacheFile.getParent());
|
||||||
Files.copy(resp.getInputStream(), cacheFile);
|
Files.copy(resp.getInputStream(), cacheFile);
|
||||||
|
|
||||||
BufferedImage bufferedimage = ImageIO.read(Files.newInputStream(cacheFile));
|
BufferedImage bufferedimage = ImageIO.read(Files.newInputStream(cacheFile));
|
||||||
|
|
Loading…
Reference in a new issue