open failed: EBUSY (Device or resource busy)

I have a big Answer!!
The Problem comes from the Android System or/and the FAT32 system.
I can not explain how the system gets the error, it has something to do with deleting files and the FAT32 System.

But the solution is really easy:
Before you delete a Directory or File: rename it!

Code to rename:

final File to = new File(file.getAbsolutePath() + System.currentTimeMillis());
file.renameTo(to);
to.delete();

That’s it, if you rename the folder or file before you delete it, there is no chance for the system to try to open an existing file again or an open file which you want to save again (or something like this).

Leave a Comment

bahis casinocanlı casino siteleritürkçe altyazılı pornocanlı bahis casino