diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt index 5f92d489c..2519b986b 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt @@ -164,13 +164,13 @@ fun Context.getSAFOnlyDirs(): List { } fun Context.isAccessibleWithSAFSdk30(path: String): Boolean { - if(path.startsWith(filesDir.absolutePath)){ + if (path.startsWith(filesDir.absolutePath)) { return false } val firstParentPath = path.getFirstParentPath(this) val firstParentDir = path.getFirstParentDirName(this) - return isRPlus() && firstParentPath != path && + return isRPlus() && !Environment.isExternalStorageManager() && firstParentPath != path && DIRS_INACCESSIBLE_WITH_SAF_SDK_30.all { firstParentDir != it }