mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -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,19 +220,20 @@ final class ZXingLMMainScreen extends MainScreen {
|
||||||
showMessage("An error occured processing the image.");
|
showMessage("An error occured processing the image.");
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
if (is != null) {
|
|
||||||
try {
|
try {
|
||||||
|
if (is != null) {
|
||||||
is.close();
|
is.close();
|
||||||
} catch (IOException ioe) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (file != null && file.exists()) {
|
if (file != null && file.exists()) {
|
||||||
if (file.isOpen()) {
|
if (file.isOpen()) {
|
||||||
//file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
//file.delete();
|
file.delete();
|
||||||
Log.info("Deleted image file.");
|
Log.info("Deleted image file.");
|
||||||
}
|
}
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
Log.error("Error while closing file: " + ioe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (capturedImage != null) {
|
if (capturedImage != null) {
|
||||||
|
|
Loading…
Reference in a new issue