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:13:26 +0300
committerMichael Schuster <michael@schuster.ms>2019-12-24 14:13:26 +0300
commit1d745535f7a95ff2265d6b6b47121200338fce83 (patch)
tree26a866560bfa4dd1100a3fcfba3702a14f506ff5
parent3184aeed436066d003cdc9513b382f60b5a763b8 (diff)
KeychainChunk: Fix error handling in ReadJob::slotReadJobDonev2.6.2
Signed-off-by: Michael Schuster <michael@schuster.ms>
-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();