Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
liias committed Sep 19, 2024
1 parent 6f9f285 commit cd904e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extra/linux/dist/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ if [[ $* != *--skip-desktop-database* ]]; then
update-desktop-database "$TARGET_DESKTOP_DIR_PATH"

# Sets Browsers as default application for https and http mimetypes
xdg-mime default "software.Browsers.desktop" https http || echo "Could not make Browsers as default web link opener"
xdg-mime default "software.Browsers.desktop" x-scheme-handler/https x-scheme-handler/http || echo "Could not make Browsers as default web link opener"
fi

echo "Browsers has been installed. Enjoy!"
Expand Down
4 changes: 2 additions & 2 deletions src/linux/linux_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ pub fn set_default_web_browser() -> bool {
pub fn is_default_web_browser() -> bool {
let desktop_file_name = format!("{}.desktop", XDG_NAME);

let https_default_app = query_default_app("https").unwrap_or("".to_string());
let http_default_app = query_default_app("http").unwrap_or("".to_string());
let https_default_app = query_default_app("x-scheme-handler/https").unwrap_or("".to_string());
let http_default_app = query_default_app("x-scheme-handler/http").unwrap_or("".to_string());

return https_default_app == desktop_file_name && http_default_app == desktop_file_name;
}
Expand Down

0 comments on commit cd904e7

Please sign in to comment.