From 111ec5541f0f85eb6b156c83c09f4da3cfc6ebdb Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 19 Jan 2016 19:30:55 +0100 Subject: [PATCH] Fix an error with empty pages from downloaded chapters (images not found) --- .../java/eu/kanade/tachiyomi/data/download/DownloadManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java index 381bbd9fc..c1c3411a5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java @@ -268,7 +268,7 @@ public class DownloadManager { // Get the filename for an image given the page private String getImageFilename(Page page) { String url = page.getImageUrl(); - return Uri.parse(url).getLastPathSegment(); + return Uri.parse(url).getLastPathSegment().replaceAll("[^\\sa-zA-Z0-9.-]", "_"); } private boolean isImageDownloaded(File imagePath) {