parent
79e5c0928b
commit
5cd666d949
|
@ -66,6 +66,12 @@ class CreateNewItemDialog(val activity: SimpleActivity, val path: String, val ca
|
|||
callback(false)
|
||||
}
|
||||
}
|
||||
} else if (activity.isPathOnOTG(path)) {
|
||||
val parent = activity.getDocumentFile(path.getParentPath())
|
||||
val created = parent?.createDirectory(path.getFilenameFromPath())
|
||||
if (created != null) {
|
||||
success(alertDialog)
|
||||
}
|
||||
} else {
|
||||
if (File(path).mkdirs()) {
|
||||
success(alertDialog)
|
||||
|
@ -137,8 +143,17 @@ class CreateNewItemDialog(val activity: SimpleActivity, val path: String, val ca
|
|||
}
|
||||
|
||||
isRPlus() || path.startsWith(activity.internalStoragePath, true) -> {
|
||||
if (File(path).createNewFile()) {
|
||||
success(alertDialog)
|
||||
|
||||
if (activity.isPathOnOTG(path)) {
|
||||
val parent = activity.getDocumentFile(path.getParentPath())
|
||||
val created = parent?.createFile(path.getMimeType(), path.getFilenameFromPath())
|
||||
if (created != null) {
|
||||
success(alertDialog)
|
||||
}
|
||||
} else {
|
||||
if (File(path).createNewFile()) {
|
||||
success(alertDialog)
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.simplemobiletools.filemanager.pro.extensions
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.net.Uri
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
|
Loading…
Reference in New Issue