Skip to content

Commit

Permalink
[VXP]: fixes #109
Browse files Browse the repository at this point in the history
taobao has a strange file jsserver_crash_info.log, it can not be deleted!! so just continue when some file delete failed.
  • Loading branch information
weishu.tws committed May 9, 2018
1 parent e00bc95 commit d5c5b17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VirtualApp/launcher
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,19 @@ public static boolean deleteDir(File dir) {
if (dir == null) {
return false;
}
boolean success = true;
if (dir.isDirectory()) {
String[] children = dir.list();
for (String file : children) {
boolean success = deleteDir(new File(dir, file));
if (!success) {
return false;
boolean ret = deleteDir(new File(dir, file));
if (!ret) {
success = false;
}
}
if (success) {
// if all subdirectory are deleted, delete the dir itself.
return dir.delete();
}
}
return dir.delete();
}
Expand Down

0 comments on commit d5c5b17

Please sign in to comment.