The scan, e.g. listfiles or lookup, would use a different logic to check what access level is needed. Example:
In the CorpseFinder, the scan would use listFiles on Android/data and the Mode.AUTO would resolve to Mode.ADB or Mode.ROOT. Either mode can see files in Android/data and return good results. But the deletion would always hit the javaFile.parentFile?.canExecute() == true -> true case and resolve Mode.AUTO to Mode.NORMAL, i.e. try normal access. Normal access wouldn't see the file in Android/data and then assume that it had already been deleted... :(
The scan, e.g. listfiles or lookup, would use a different logic to check what access level is needed. Example: In the CorpseFinder, the scan would use
listFiles
onAndroid/data
and theMode.AUTO
would resolve toMode.ADB
orMode.ROOT
. Either mode can see files inAndroid/data
and return good results. But the deletion would always hit thejavaFile.parentFile?.canExecute() == true -> true
case and resolveMode.AUTO
toMode.NORMAL
, i.e. try normal access. Normal access wouldn't see the file inAndroid/data
and then assume that it had already been deleted... :(