From 446b146f953b41a304840453ef6f1f015c75f082 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 24 Dec 2023 22:32:23 -0500 Subject: [PATCH] Ensure sufficiently long prefix when creating temp file Fixes #10265 --- core/src/main/java/tachiyomi/core/storage/UniFileExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/tachiyomi/core/storage/UniFileExtensions.kt b/core/src/main/java/tachiyomi/core/storage/UniFileExtensions.kt index c5c2bbbc8..65846ff6e 100644 --- a/core/src/main/java/tachiyomi/core/storage/UniFileExtensions.kt +++ b/core/src/main/java/tachiyomi/core/storage/UniFileExtensions.kt @@ -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, )