diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt index 67b22be3f..6ae3bd977 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt @@ -149,9 +149,11 @@ class BookSourceViewModel(application: Application) : BaseViewModel(application) importSource(file.readText(), finally) } else { withContext(Dispatchers.Main) { - finally("文件无法打开") + finally("打开文件出错") } } + }.onError { + finally(it.localizedMessage ?: "打开文件出错") } }