diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-23 23:13:19 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-23 23:13:19 +0200 |
commit | a990044fd9eab711e4de7c74aa453f362456050b (patch) | |
tree | 6909a4329517eec38a49fda3455f1ca38d867ad2 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | ed82f0de9e880091c86845fcdf4fb58bdbb52798 (diff) | |
download | open-keychain-a990044fd9eab711e4de7c74aa453f362456050b.tar.gz open-keychain-a990044fd9eab711e4de7c74aa453f362456050b.tar.bz2 open-keychain-a990044fd9eab711e4de7c74aa453f362456050b.zip |
fix: save file
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java index 092c5f832..d2bff8336 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java @@ -219,9 +219,9 @@ public class DecryptListFragment case REQUEST_CODE_OUTPUT: { // This happens after output file was selected, so start our operation if (resultCode == Activity.RESULT_OK && data != null) { + Uri decryptedFileUri = mOutputUris.get(mCurrentInputUri); Uri saveUri = data.getData(); - Uri outputUri = mOutputUris.get(mCurrentInputUri); - saveFile(saveUri, outputUri); + saveFile(decryptedFileUri, saveUri); mCurrentInputUri = null; } return; @@ -233,15 +233,15 @@ public class DecryptListFragment } } - private void saveFile(Uri outputUri, Uri saveUri) { + private void saveFile(Uri decryptedFileUri, Uri saveUri) { Activity activity = getActivity(); if (activity == null) { return; } try { - FileHelper.copyUriData(activity, outputUri, saveUri); - Notify.create(activity, R.string.file_saved, Style.ERROR).show(); + FileHelper.copyUriData(activity, decryptedFileUri, saveUri); + Notify.create(activity, R.string.file_saved, Style.OK).show(); } catch (IOException e) { Log.e(Constants.TAG, "error saving file", e); Notify.create(activity, R.string.error_saving_file, Style.ERROR).show(); |