diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
index 8569877af..fc4c9ed75 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
@@ -158,6 +158,10 @@ public class EncryptFilesFragment extends Fragment implements EncryptActivityInt
}
private void encryptClicked(boolean share) {
+ if (mEncryptInterface.getInputUris().isEmpty()) {
+ Notify.showNotify(getActivity(), R.string.error_no_file_selected, Notify.Style.ERROR);
+ return;
+ }
if (share) {
mEncryptInterface.getOutputUris().clear();
for (Uri uri : mEncryptInterface.getInputUris()) {
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index b17196587..14d0eba9b 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -910,6 +910,7 @@
"Do not create OpenKeychain-Accounts manually.\nFor more information, see Help."
"Show key (%s)"
"Swipe down to update from keyserver"
+ "Select at least one file to encrypt!"
"Saving of multiple files not supported. This is a limitation on current Android."