summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2012-03-21 16:41:38 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2012-03-21 16:41:38 (GMT)
commit42f8b1b51b09cb4b64fadf7e6cdd5ce359b0fa74 (patch)
treea80dfc220e182c54c041167706d1245e64466124
parent2a100ae8d203107d17e438f67f65d26a4949cccc (diff)
fix crash when list of files to decrypt is empty
This happens when the last file in the list would overwrite an existing file and instead of overwriting the decryption of that file was skipped. FIXED-IN:4.8.2 BUG:294641
-rw-r--r--kgpgexternalactions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kgpgexternalactions.cpp b/kgpgexternalactions.cpp
index 69b3653..d8566f8 100644
--- a/kgpgexternalactions.cpp
+++ b/kgpgexternalactions.cpp
@@ -292,14 +292,14 @@ void KGpgExternalActions::decryptDroppedFile()
void KGpgExternalActions::decryptFile()
{
+ if (droppedUrls.isEmpty())
+ return;
+
while (!droppedUrls.first().isLocalFile()) {
showDroppedFile();
droppedUrls.pop_front();
}
- if (droppedUrls.isEmpty())
- return;
-
QString oldname(droppedUrls.first().fileName());
if (oldname.endsWith(QLatin1String(".gpg"), Qt::CaseInsensitive) ||
oldname.endsWith(QLatin1String(".asc"), Qt::CaseInsensitive) ||