[skip ci] fix
This commit is contained in:
@@ -523,8 +523,9 @@ interface JsExtensions : JsEncodeUtils {
|
|||||||
fun unArchiveFile(zipPath: String): String {
|
fun unArchiveFile(zipPath: String): String {
|
||||||
if (zipPath.isEmpty()) return ""
|
if (zipPath.isEmpty()) return ""
|
||||||
val zipFile = getFile(zipPath)
|
val zipFile = getFile(zipPath)
|
||||||
return ArchiveUtils.deCompress(zipFile.absolutePath).toString()
|
return ArchiveUtils.deCompress(zipFile.absolutePath).let {
|
||||||
.substring(FileUtils.getCachePath().length)
|
ArchiveUtils.TEMP_FOLDER_NAME + File.separator + MD5Utils.md5Encode16(zipFile.name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ class BookInfoActivity :
|
|||||||
onClick?.invoke(it)
|
onClick?.invoke(it)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showDecompressFileImportAlert(files)
|
showDecompressFileImportAlert(files, onClick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ import java.io.File
|
|||||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
||||||
object ArchiveUtils {
|
object ArchiveUtils {
|
||||||
|
|
||||||
|
const val TEMP_FOLDER_NAME = "ArchiveTemp"
|
||||||
// 临时目录 下次启动自动删除
|
// 临时目录 下次启动自动删除
|
||||||
val TEMP_PATH: String by lazy {
|
val TEMP_PATH: String by lazy {
|
||||||
appCtx.externalCache.getFile("ArchiveTemp").createFolderReplace().absolutePath
|
appCtx.externalCache.getFile(TEMP_FOLDER_NAME).createFolderReplace().absolutePath
|
||||||
}
|
}
|
||||||
|
|
||||||
fun deCompress(
|
fun deCompress(
|
||||||
|
|||||||
Reference in New Issue
Block a user