Explorar el Código

Fix an error with empty pages from downloaded chapters (images not found)

inorichi hace 9 años
padre
commit
111ec5541f

+ 1 - 1
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) {