diff options
author | Colin Guthrie <colin@mageia.org> | 2012-09-04 01:37:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-12 08:20:01 +0200 |
commit | 78ab361c8f5f5d7614b5bf98b92f3aec4183bfb7 (patch) | |
tree | 132c83433111620ffe71ff4673450bf24c601d11 | |
parent | 23bd3b6263e4fd9c15cfb6c05e65fa425791374c (diff) |
logind: Avoid unnecesary rewrite of user file when switching sessions of the same user.
-rw-r--r-- | src/login/logind-seat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 937315ebf1..c2cf6e5e13 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -263,7 +263,8 @@ int seat_set_active(Seat *s, Session *session) { if (old_active) { session_save(old_active); - user_save(old_active->user); + if (!session || session->user != old_active->user) + user_save(old_active->user); } return 0; |