mirror of
https://github.com/zxing/zxing.git
synced 2025-01-26 18:44:42 -08:00
Issue 126: make sure files are deleted after done
git-svn-id: https://zxing.googlecode.com/svn/trunk@826 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
25bdb39ac1
commit
84e3f0f45d
|
@ -220,18 +220,19 @@ final class ZXingLMMainScreen extends MainScreen {
|
|||
showMessage("An error occured processing the image.");
|
||||
return;
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
try {
|
||||
if (is != null) {
|
||||
is.close();
|
||||
} catch (IOException ioe) {
|
||||
}
|
||||
}
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isOpen()) {
|
||||
//file.close();
|
||||
if (file != null && file.exists()) {
|
||||
if (file.isOpen()) {
|
||||
file.close();
|
||||
}
|
||||
file.delete();
|
||||
Log.info("Deleted image file.");
|
||||
}
|
||||
//file.delete();
|
||||
Log.info("Deleted image file.");
|
||||
} catch (IOException ioe) {
|
||||
Log.error("Error while closing file: " + ioe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue