Ensure sufficiently long prefix when creating temp file
Fixes #10265 (cherry picked from commit 446b146f953b41a304840453ef6f1f015c75f082)
This commit is contained in:
parent
0dc3b37e70
commit
d215944722
@ -16,7 +16,7 @@ val UniFile.nameWithoutExtension: String?
|
||||
fun UniFile.toTempFile(context: Context): File {
|
||||
val inputStream = context.contentResolver.openInputStream(uri)!!
|
||||
val tempFile = File.createTempFile(
|
||||
nameWithoutExtension.orEmpty(),
|
||||
nameWithoutExtension.orEmpty().padEnd(3), // Prefix must be 3+ chars
|
||||
null,
|
||||
)
|
||||
|
||||
|
@ -61,7 +61,7 @@ actual class LocalCoverManager(
|
||||
// SY -->
|
||||
if (encrypted) {
|
||||
val tempFile = File.createTempFile(
|
||||
targetFile.nameWithoutExtension.orEmpty(),
|
||||
targetFile.nameWithoutExtension.orEmpty().padEnd(3), // Prefix must be 3+ chars
|
||||
null,
|
||||
)
|
||||
val zip4j = ZipFile(tempFile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user