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:
srowen 2009-01-17 00:44:53 +00:00
parent 25bdb39ac1
commit 84e3f0f45d

View file

@ -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);
}
}