mirror of
https://github.com/13hannes11/xkcd_poster_creator.git
synced 2024-09-03 21:50:58 +02:00
fixed: file ending not properly attached to images
This commit is contained in:
@@ -19,8 +19,7 @@ public class ImageDownloader {
|
|||||||
|
|
||||||
private void downloadImage(final String url, final String folderPath, final int counter) throws IOException {
|
private void downloadImage(final String url, final String folderPath, final int counter) throws IOException {
|
||||||
final InputStream in = new URL(url).openStream();
|
final InputStream in = new URL(url).openStream();
|
||||||
final String fileName = "Comic_" + counter;
|
final String fileName = "Comic_" + counter + url.substring(url.lastIndexOf("."));
|
||||||
// url.substring(url.lastIndexOf("/")).replaceAll("[^A-Za-z0-9.]", "");
|
|
||||||
|
|
||||||
downloadedImages.add(folderPath + fileName);
|
downloadedImages.add(folderPath + fileName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user