summaryrefslogtreecommitdiffstats
path: root/examples/maildirresource/maildirresource.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-02 13:36:16 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-02 13:36:16 +0200
commitbf4cdc003998aad33525b540fc54ce18b343de1f (patch)
treeb80c256963651378c3e2ece432f1039dad7b3aa6 /examples/maildirresource/maildirresource.cpp
parent855a878bcc124f8949586b3656dcc6e545e18dc0 (diff)
downloadsink-bf4cdc003998aad33525b540fc54ce18b343de1f.tar.gz
sink-bf4cdc003998aad33525b540fc54ce18b343de1f.zip
The existence inspection is separate from the rest
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r--examples/maildirresource/maildirresource.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp
index 268f506..d67eb50 100644
--- a/examples/maildirresource/maildirresource.cpp
+++ b/examples/maildirresource/maildirresource.cpp
@@ -573,14 +573,14 @@ KAsync::Job<void> MaildirResource::inspect(int inspectionType, const QByteArray
573 } 573 }
574 return KAsync::error<void>(1, QString("Wrong number of files; found %1 instead of %2.").arg(list.size()).arg(expectedCount)); 574 return KAsync::error<void>(1, QString("Wrong number of files; found %1 instead of %2.").arg(list.size()).arg(expectedCount));
575 } 575 }
576 if (inspectionType == Sink::ResourceControl::Inspection::ExistenceInspectionType) { 576 }
577 if (!remoteId.endsWith(folder.getName().toUtf8())) { 577 if (inspectionType == Sink::ResourceControl::Inspection::ExistenceInspectionType) {
578 return KAsync::error<void>(1, "Wrong folder name: " + remoteId); 578 if (!remoteId.endsWith(folder.getName().toUtf8())) {
579 } 579 return KAsync::error<void>(1, "Wrong folder name: " + remoteId);
580 //TODO we shouldn't use the remoteId here to figure out the path, it could be gone/changed already 580 }
581 if (QDir(remoteId).exists() != expectedValue.toBool()) { 581 //TODO we shouldn't use the remoteId here to figure out the path, it could be gone/changed already
582 return KAsync::error<void>(1, "Wrong folder existence: " + remoteId); 582 if (QDir(remoteId).exists() != expectedValue.toBool()) {
583 } 583 return KAsync::error<void>(1, "Wrong folder existence: " + remoteId);
584 } 584 }
585 } 585 }
586 586