Add check for isExternalStorageManager

- if the app (like Simple FileManger), is an External Storage Manager, then there is no need to use SAF
This commit is contained in:
darthpaul 2022-02-24 17:24:25 +00:00
parent 46c5529ec7
commit ad250836eb

View file

@ -170,7 +170,7 @@ fun Context.isAccessibleWithSAFSdk30(path: String): Boolean {
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
}