mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -139,7 +139,7 @@ interface JsExtensions {
|
||||
path.startsWith("/storage") -> FileUtils.readText(path)
|
||||
else -> {
|
||||
//相对路径
|
||||
val jsPath = if (path.startsWith("/")) path else "/" + path
|
||||
val jsPath = if (path.startsWith("/")) path else "/$path"
|
||||
//先找书籍保存目录下有没有
|
||||
val publicStoragePath = AppConfig.defaultBookTreeUri
|
||||
val jsString = publicStoragePath?.let {
|
||||
@@ -154,7 +154,7 @@ interface JsExtensions {
|
||||
if (jsString.isNullOrBlank()) readTxtFile(path) else jsString
|
||||
}
|
||||
}
|
||||
if (result.isBlank()) throw NoStackTraceException("${path} 内容获取失败或者为空")
|
||||
if (result.isBlank()) throw NoStackTraceException("$path 内容获取失败或者为空")
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user