避免 EBUSY (Device or resource busy) 错误

This commit is contained in:
seven332 committed 2014-12-20 03:52:21 +08:00
1 parent fa3d55d341
commit 0b07256c9b
1 file changed
+6 -1
+6 -1
View File
@@ -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();
}
/**