瀏覽代碼

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

inorichi 9 年之前
父節點
當前提交
111ec5541f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java

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