Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +4 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,10 @@ fun Context.trySAFFileDelete(fileDirItem: FileDirItem, allowDeleteFolder: Boolea if (!fileDeleted) { val document = getDocumentFile(fileDirItem.path) if (document != null && (fileDirItem.isDirectory == document.isDirectory)) { try { fileDeleted = (document.isFile == true || allowDeleteFolder) && DocumentsContract.deleteDocument(applicationContext.contentResolver, document.uri) } catch (ignored: Exception) { } } } Loading Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +4 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,10 @@ fun Context.trySAFFileDelete(fileDirItem: FileDirItem, allowDeleteFolder: Boolea if (!fileDeleted) { val document = getDocumentFile(fileDirItem.path) if (document != null && (fileDirItem.isDirectory == document.isDirectory)) { try { fileDeleted = (document.isFile == true || allowDeleteFolder) && DocumentsContract.deleteDocument(applicationContext.contentResolver, document.uri) } catch (ignored: Exception) { } } } Loading