Skip to content

Commit

Permalink
swallow the all the exception during cleanup the backup soSource
Browse files Browse the repository at this point in the history
Reviewed By: phecdarain

Differential Revision: D52261779

fbshipit-source-id: 083242853aa9683a72bd0e168ce166e805d9b932
  • Loading branch information
simpleton authored and facebook-github-bot committed Dec 18, 2023
1 parent 9d90433 commit a470f78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/com/facebook/soloader/SoLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,10 @@ private static void addBackupSoSource(
// Clean up backups
final File backupDir = UnpackingSoSource.getSoStorePath(context, SO_STORE_NAME_MAIN);
try {
SysUtil.dumbDelete(backupDir);
} catch (IOException e) {
if (backupDir.exists()) {
SysUtil.dumbDelete(backupDir);
}
} catch (Exception e) {
LogUtil.w(TAG, "Failed to delete " + backupDir.getCanonicalPath(), e);
}
return;
Expand Down

0 comments on commit a470f78

Please sign in to comment.