Skip to content

Commit

Permalink
fix(backend/i18n): check for kwriteconfig6 properly
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko committed Jan 11, 2025
1 parent 3a7aebd commit 16bedd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub async fn set_keymap(
tmp = uzers::get_current_username().expect("can't get current username");
tmp.to_str().unwrap()
});
if (tokio::fs::try_exists("/usr/share/kwriteconfig6").await).is_ok() {
if let Ok(true) = tokio::fs::try_exists("kwriteconfig6").await {
set_kde_keymap(user, layout, variant).await
} else {
set_gsettings_keymap(user, layout, variant).await
Expand All @@ -252,7 +252,7 @@ pub async fn set_all(
tmp = uzers::get_current_username().expect("can't get current username");
tmp.to_str().unwrap()
});
if (tokio::fs::try_exists("/usr/share/kwriteconfig6").await).is_ok() {
if let Ok(true) = tokio::fs::try_exists("kwriteconfig6").await {
set_kde_all(user, layout, variant, im).await
} else {
set_gsettings_all(user, layout, variant, im).await
Expand Down

0 comments on commit 16bedd9

Please sign in to comment.