From 44a0cfaa818aed8e37d51eec8f94c44da6771002 Mon Sep 17 00:00:00 2001 From: Tuomas Airaksinen Date: Wed, 25 Dec 2024 19:56:18 +0200 Subject: [PATCH] Try to fix epub crash --- .../main/java/net/bible/service/sword/epub/EpubBackendState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/bible/service/sword/epub/EpubBackendState.kt b/app/src/main/java/net/bible/service/sword/epub/EpubBackendState.kt index 06606670f6..2a93b6ab91 100644 --- a/app/src/main/java/net/bible/service/sword/epub/EpubBackendState.kt +++ b/app/src/main/java/net/bible/service/sword/epub/EpubBackendState.kt @@ -151,7 +151,7 @@ class EpubBackendState(private val epubDir: File): OpenFileState { val frag = getFragment(key)?: return emptyList() val file = fileForOriginalId(frag.originalId)?: return emptyList() val parentFolder = file.parentFile - return dao.styleSheets(frag.originalId).map { File(parentFolder, it.styleSheetFile) } + return dao.styleSheets(frag.originalId).map { File(parentFolder, it.styleSheetFile).canonicalFile } } private fun getKey(fragment: EpubFragment, label: String? = null): Key {