mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Migration46: remove old pam folder in noctalia settings folder
This commit is contained in:
@@ -10,16 +10,10 @@ QtObject {
|
||||
const shellName = "noctalia";
|
||||
const configDir = Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/";
|
||||
const pamConfigDir = configDir + "pam";
|
||||
const pamConfigFile = pamConfigDir + "/password.conf";
|
||||
|
||||
// Remove the file if it exists
|
||||
const script = `rm -f '${pamConfigFile}'`;
|
||||
// Remove the entire pam directory if it exists
|
||||
const script = `rm -rf '${pamConfigDir}'`;
|
||||
Quickshell.execDetached(["sh", "-c", script]);
|
||||
|
||||
// Attempt to remove the directory if empty (ignore errors)
|
||||
const rmdirScript = `rmdir '${pamConfigDir}' 2>/dev/null || true`;
|
||||
Quickshell.execDetached(["sh", "-c", rmdirScript]);
|
||||
|
||||
logger.d("Migration46", "Cleaned up legacy PAM config");
|
||||
|
||||
return true;
|
||||
|
||||
@@ -19,8 +19,8 @@ QtObject {
|
||||
42: migration42Component,
|
||||
43: migration43Component,
|
||||
44: migration44Component,
|
||||
45: migration45Component
|
||||
// 46: migration46Component
|
||||
45: migration45Component,
|
||||
46: migration46Component
|
||||
})
|
||||
|
||||
// Migration components
|
||||
@@ -37,5 +37,5 @@ QtObject {
|
||||
property Component migration43Component: Migration43 {}
|
||||
property Component migration44Component: Migration44 {}
|
||||
property Component migration45Component: Migration45 {}
|
||||
// property Component migration46Component: Migration46 {}
|
||||
property Component migration46Component: Migration46 {}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Singleton {
|
||||
- Default cache directory: ~/.cache/noctalia
|
||||
*/
|
||||
readonly property alias data: adapter // Used to access via Settings.data.xxx.yyy
|
||||
readonly property int settingsVersion: 45
|
||||
readonly property int settingsVersion: 46
|
||||
readonly property bool isDebug: Quickshell.env("NOCTALIA_DEBUG") === "1"
|
||||
readonly property string shellName: "noctalia"
|
||||
readonly property string configDir: Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
|
||||
|
||||
Reference in New Issue
Block a user