Browse Source
On the first attempt to move the temp file, NoSuchFileException can be raised if the destination folder does not exist. Instead of handling this implicitly in the catch of IOException and then continuing to create the destination folder and try again, explicitly catch it and create the destination folder. If any other IOException occurs, treat it as an unexpected error and return FAILURE. Subsequently, on the second attempt to move the temp file, if ANY kind of IOException occurs, also consider this an unexpected error and return FAILURE. In both catch blocks for IOException, add logging at ERROR level. Change-Id: I9de9ee3d2b368be36e02ee1c0daf8e844f7e46c8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>stable-5.7
David Pursehouse
5 years ago
1 changed files with 13 additions and 19 deletions
Loading…
Reference in new issue