Bug: File.Exists isn't always reliable

kanaida

Active Member
Licensed User
Longtime User
I'm not sure why, but this doesn't return the correct value sometimes:

B4X:
File.Exists( "/system/app","11-11-11-10h-56m_9340_9258_answers_obfuscate-release.apk")

I can clearly see the file exists via adb shell and root explorer. But i'm getting a false instead of true.

My only work around at the moment is using shell commands.

It would also be nice to add another File.Exists(FullPath as string) instead of 2 params even though it's no biggie, just convenient sometimes.

You could reproduce it probably by creating a new file with that same name in root explorer, then trying to check if it exists. Perhaps it's something funky in the filename that was unexpected.
 

Venox

New Member
Licensed User
Longtime User
upper-lower case

In my case, when the filename have uppercase chars does'nt work.
Passing uppercase to lowercase chars, done!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…