diff --git a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt index 191dbc10a..16ea5ded3 100644 --- a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt @@ -59,7 +59,11 @@ class ImportBookActivity : VMBaseActivity(R.layout.activity private fun getPath(): String { rootDoc?.let { - return it.name + File.separator + subDirs.joinToString(File.separator) + var path = it.name + File.separator + subDirs.joinToString(File.separator) + if (!path.endsWith(File.separator)) { + path += File.separator + } + return path } return "" }