mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-16 10:56:50 -04:00
Fixed: application crashing when hosting the split zim files on server, since we have an issue with split zim files of zim-tools
. Due to this issue, there is crash reported on the playStore. Because we have full access to files in the playStore variant since all the files are located in the app-specific
directory.
* Improved the log for showing the actual error if there is something goes wrong while adding the book in `Library`.
This commit is contained in:
parent
17dac247c7
commit
e48e46b923
@ -23,7 +23,6 @@ import org.kiwix.kiwixmobile.core.utils.files.Log
|
||||
import org.kiwix.kiwixmobile.core.reader.ZimReaderContainer
|
||||
import org.kiwix.kiwixmobile.core.utils.files.FileUtils.getDemoFilePathForCustomApp
|
||||
import org.kiwix.libkiwix.Book
|
||||
import org.kiwix.libkiwix.JNIKiwixException
|
||||
import org.kiwix.libkiwix.Library
|
||||
import org.kiwix.libkiwix.Server
|
||||
import org.kiwix.libzim.Archive
|
||||
@ -67,8 +66,13 @@ class KiwixServer @Inject constructor(
|
||||
update(archive)
|
||||
}
|
||||
kiwixLibrary.addBook(book)
|
||||
} catch (e: JNIKiwixException) {
|
||||
Log.v(TAG, "Couldn't add book with path:{ $path }")
|
||||
} catch (ignore: Exception) {
|
||||
// Catch the other exceptions as well. e.g. while hosting the split zim files.
|
||||
// we have an issue with split zim files, see #3827
|
||||
Log.v(
|
||||
TAG,
|
||||
"Couldn't add book with path:{ $path }.\n Original Exception = $ignore"
|
||||
)
|
||||
}
|
||||
}
|
||||
return KiwixServer(kiwixLibrary, Server(kiwixLibrary))
|
||||
|
Loading…
x
Reference in New Issue
Block a user