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,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) {