From 003dca9d45ff122cb24f176b314389e57b4ad7f1 Mon Sep 17 00:00:00 2001 From: Pavka Date: Tue, 7 May 2019 12:06:38 +0300 Subject: [PATCH] Bugfix. Sharing images with very long name (#1999) * Fix sharing with very long images name * Fix dropLast to take --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index fbb2f4bbfe..e24feb8e35 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -434,7 +434,8 @@ class ReaderPresenter( // Build destination file. val filename = DiskUtil.buildValidFilename( - "${manga.title} - ${chapter.name}") + " - ${page.number}.${type.extension}" + "${manga.title} - ${chapter.name}".take(225) + ) + " - ${page.number}.${type.extension}" val destFile = File(directory, filename) stream().use { input ->