Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schuster <michael@schuster.ms>2019-12-24 14:17:43 +0300
committerMichael Schuster <michael@schuster.ms>2019-12-24 14:17:43 +0300
commit2b2810511d5d3a70ac37f0241b764d7526b9dfac (patch)
treeaacb59485a1b882fbad3592eec97855c91951baf /src/gui/creds
parente07859fb3cc8451a180a3677f9eabe3c320af9b8 (diff)
KeychainChunk: Fix error handling in ReadJob::slotReadJobDone
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/creds')
-rw-r--r--src/gui/creds/keychainchunk.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/creds/keychainchunk.cpp b/src/gui/creds/keychainchunk.cpp
index 4115c938d..ceacd27d7 100644
--- a/src/gui/creds/keychainchunk.cpp
+++ b/src/gui/creds/keychainchunk.cpp
@@ -174,9 +174,6 @@ void ReadJob::slotReadJobDone(QKeychain::Job *incomingJob)
QKeychain::ReadPasswordJob *readJob = static_cast<QKeychain::ReadPasswordJob *>(incomingJob);
if (readJob) {
- _error = readJob->error();
- _errorString = readJob->errorString();
-
if (readJob->error() == NoError && readJob->binaryData().length() > 0) {
_chunkBuffer.append(readJob->binaryData());
_chunkCount++;
@@ -205,7 +202,12 @@ void ReadJob::slotReadJobDone(QKeychain::Job *incomingJob)
}
#endif
} else {
+ if (readJob->error() != QKeychain::Error::EntryNotFound ||
+ ((readJob->error() == QKeychain::Error::EntryNotFound) && _chunkCount == 0)) {
+ _error = readJob->error();
+ _errorString = readJob->errorString();
qCWarning(lcKeychainChunk) << "Unable to read" << readJob->key() << "chunk" << QString::number(_chunkCount) << readJob->errorString();
+ }
}
readJob->deleteLater();