避免 EBUSY (Device or resource busy) 错误
This commit is contained in:
1 parent
fa3d55d341
commit
0b07256c9b
1 file changed
+6
-1
@@ -209,7 +209,12 @@ public final class Utils {
|
||||
for (File f : files)
|
||||
deleteFile(f);
|
||||
}
|
||||
file.delete();
|
||||
final File to = new File(file.getAbsolutePath()
|
||||
+ System.currentTimeMillis());
|
||||
if (file.renameTo(to))
|
||||
to.delete();
|
||||
else
|
||||
file.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user