Handle 1000+ pages properly in the downloader (#8818)
(cherry picked from commit 611ec8103c21f01db141f58b507a20201e840c9b)
This commit is contained in:
parent
e4d32d9ce6
commit
7e8b3b0623
@ -388,7 +388,9 @@ class Downloader(
|
||||
return Observable.just(page)
|
||||
}
|
||||
|
||||
val filename = String.format("%03d", page.number)
|
||||
val digitCount = (download.pages?.size ?: 0).toString().length.coerceAtLeast(3)
|
||||
|
||||
val filename = String.format("%0${digitCount}d", page.number)
|
||||
val tmpFile = tmpDir.findFile("$filename.tmp")
|
||||
|
||||
// Delete temp file if it exists.
|
||||
|
Loading…
x
Reference in New Issue
Block a user