fix: renaming folders in gallery
- use SAF when renaming folders on SDK 30+, - for those folders that cannot be accessed with SAF, display an error immediately
This commit is contained in:
parent
11288f0e8c
commit
6c41c30cf0
1 changed files with 6 additions and 1 deletions
|
@ -930,7 +930,7 @@ fun BaseSimpleActivity.renameFile(
|
|||
}
|
||||
}
|
||||
} else if (isAccessibleWithSAFSdk30(oldPath)) {
|
||||
if (canManageMedia() && isPathOnInternalStorage(oldPath)) {
|
||||
if (canManageMedia() && !File(oldPath).isDirectory && isPathOnInternalStorage(oldPath)) {
|
||||
renameCasually(oldPath, newPath, isRenamingMultipleFiles, callback)
|
||||
} else {
|
||||
handleSAFDialogSdk30(oldPath) {
|
||||
|
@ -953,6 +953,11 @@ fun BaseSimpleActivity.renameFile(
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (isRestrictedWithSAFSdk30(oldPath)) {
|
||||
runOnUiThread {
|
||||
toast(R.string.rename_in_sd_card_system_restriction)
|
||||
callback?.invoke(false, Android30RenameFormat.NONE)
|
||||
}
|
||||
} else if (needsStupidWritePermissions(newPath)) {
|
||||
handleSAFDialog(newPath) {
|
||||
if (!it) {
|
||||
|
|
Loading…
Reference in a new issue