Commit 95150f52 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

don't store url when it's not valid

parent 6178d619
Pipeline #171649 passed with stage
in 3 minutes and 11 seconds
......@@ -316,12 +316,14 @@ void FreeBusyManagerPrivate::fbCheckerJobFinished(KJob *job)
const QString email = job->property("email").toString();
if (!job->error()) {
auto checkerJob = static_cast<FbCheckerJob *>(job);
QUrl dirURL = checkerJob->validUrl();
// write the URL to the cache
KConfig cfg(configFile());
KConfigGroup group = cfg.group(email);
group.writeEntry("url", dirURL.toDisplayString()); // prettyURL() does not write user nor password
qCDebug(AKONADICALENDAR_LOG) << "Found url email=" << email << "; url=" << dirURL;
const QUrl dirURL = checkerJob->validUrl();
if (dirURL.isValid()) {
// write the URL to the cache
KConfig cfg(configFile());
KConfigGroup group = cfg.group(email);
group.writeEntry("url", dirURL.toDisplayString()); // prettyURL() does not write user nor password
qCDebug(AKONADICALENDAR_LOG) << "Found url email=" << email << "; url=" << dirURL;
}
Q_EMIT freeBusyUrlRetrieved(email, dirURL);
} else {
qCDebug(AKONADICALENDAR_LOG) << "Returning invalid url";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment