diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index 17e39c48..d4d8ca79 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -241,15 +241,17 @@ class ItemsAdapter(val activity: SimpleActivity, var mItems: MutableList Unit) { + private fun createDirectorySync(file: File): Boolean { if (activity.needsStupidWritePermissions(file.absolutePath)) { - activity.handleSAFDialog(file) { - val documentFile = activity.getFileDocument(file.absolutePath) - if (documentFile == null) { - callback(false) - return@handleSAFDialog - } - val newDir = documentFile.createDirectory(file.name) - callback(newDir != null) - } - } else { - callback(file.mkdirs()) + val documentFile = activity.getFileDocument(file.absolutePath) ?: return false + val newDir = documentFile.createDirectory(file.name) + return newDir != null } + return file.mkdirs() } fun zipPaths(sourcePaths: List, targetPath: String): Boolean {