Commit 77052b08 authored by Nate Graham's avatar Nate Graham
Browse files

Clear cache when syncing

The syncing process simply writes files to the SDDM user's homedir; it
doesn't do any of the fancy notifying that can happen when you change
settings in a running session. As a result, old cached stuff can be kept
around and leak into the user's settings.

Let's always clear the cache at the beginning of a sync to make sure
that we return to a fresh clean state.

BUG: 440957
FIXED-IN: 5.24.6
parent fdc20600
Pipeline #184328 passed with stage
in 41 seconds
......@@ -99,6 +99,15 @@ ActionReply SddmAuthHelper::sync(const QVariantMap &args)
return ActionReply::HelperErrorReply();
}
// In plasma-framework, ThemePrivate::useCache documents the requirement to
// clear the cache when colors change while the app that uses them isn't running;
// that condition applies to the SDDM greeter here, so clear the cache if it
// exists to make sure SDDM has a fresh state
QDir sddmCacheLocation(sddmHomeDirPath + QStringLiteral("/.cache"));
if (sddmCacheLocation.exists()) {
sddmCacheLocation.removeRecursively();
}
// create SDDM config directory if it does not exist
QDir sddmConfigLocation(sddmHomeDirPath + QStringLiteral("/.config"));
if (!sddmConfigLocation.exists()) {
......
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