Suwayomi / Suwayomi-Server

A rewrite of Tachiyomi for the Desktop
Mozilla Public License 2.0
3.69k stars 196 forks source link

[Bug] Unable to read manga with very long titles #948

Open xkww3n opened 1 month ago

xkww3n commented 1 month ago

Device information

Steps to reproduce

  1. Read a manga that has a very long title using Web UI or mobile client. (In my case that is 214 characters)
  2. Error occoured.

Expected behavior

The manga should load normally.

Actual behavior

Client recieved an error icon (piece of broken paper).

Other details

Log:

java.io.FileNotFoundException: /tmp/Tachidesk/manga-cache/Certain_Source/Certain_Loooooong_Title_Manga/Chapter/024.tmp (File name too long)
tachidesk-1  |  at java.base/java.io.FileOutputStream.open0(Native Method)
tachidesk-1  |  at java.base/java.io.FileOutputStream.open(Unknown Source)
tachidesk-1  |  at java.base/java.io.FileOutputStream.<init>(Unknown Source)
tachidesk-1  |  at java.base/java.io.FileOutputStream.<init>(Unknown Source)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse.saveImage(ImageResponse.kt:95)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse.getImageResponse(ImageResponse.kt:74)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse$getImageResponse$1.invokeSuspend(ImageResponse.kt)
tachidesk-1  |  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
tachidesk-1  |  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
tachidesk-1  |  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
tachidesk-1  |  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)