diff options
Diffstat (limited to 'packages/DocumentsUI/src/com/android/documentsui/CopyService.java')
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/CopyService.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/CopyService.java b/packages/DocumentsUI/src/com/android/documentsui/CopyService.java index 9dd2b20..202402f 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/CopyService.java +++ b/packages/DocumentsUI/src/com/android/documentsui/CopyService.java @@ -466,14 +466,12 @@ public class CopyService extends IntentService { srcFile.checkError(); } catch (IOException e) { copyError = e; - } finally { - if (copyError != null) { - try { - dstFile.closeWithError(copyError.getMessage()); - } catch (IOException e) { - Log.e(TAG, "Error closing destination", e); - } + try { + dstFile.closeWithError(copyError.getMessage()); + } catch (IOException closeError) { + Log.e(TAG, "Error closing destination", closeError); } + } finally { // This also ensures the file descriptors are closed. IoUtils.closeQuietly(src); IoUtils.closeQuietly(dst); |