mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -31,7 +31,7 @@ object DocumentUtils {
|
||||
vararg subDirs: String
|
||||
): DocumentFile? {
|
||||
val parent: DocumentFile? = createFolderIfNotExist(root, *subDirs)
|
||||
return parent?.createFile(mimeType, fileName)
|
||||
return parent?.findFile(fileName) ?: parent?.createFile(mimeType, fileName)
|
||||
}
|
||||
|
||||
fun createFolderIfNotExist(root: DocumentFile, vararg subDirs: String): DocumentFile? {
|
||||
|
||||
Reference in New Issue
Block a user