pull/2129/head 3.22.080322
kunfei 2 years ago
parent 61cd06f0f8
commit 87537617c9
  1. 2
      app/src/main/java/io/legado/app/utils/DocumentExtensions.kt

@ -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? {

Loading…
Cancel
Save