Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualHotBar committed May 4, 2024
1 parent 03583a3 commit cd2db9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ fn run_command(cmd: &str) -> Result<(), Box<dyn Error>> {
fn get_winfsp_install_state() -> Result<bool, usize> {
#[cfg(not(target_os = "windows"))]
return Ok(false);

#[cfg(target_os = "windows")]
match is_winfsp_installed() {
Ok(is_enabled) => Ok(is_enabled),
Expand All @@ -145,6 +146,7 @@ fn get_autostart_state() -> Result<bool, usize> {
#[cfg(target_os = "macos")]
Ok(false);

#[cfg(not(target_os = "macos"))]
match is_autostart() {
Ok(is_enabled) => Ok(is_enabled),
Err(_) => Ok(false),
Expand All @@ -156,6 +158,7 @@ fn set_autostart_state(enabled: bool) -> Result<(), ()> {
#[cfg(target_os = "macos")]
Ok(());

#[cfg(not(target_os = "macos"))]
let _ = set_autostart(enabled);
Ok(())
}
Expand Down

0 comments on commit cd2db9d

Please sign in to comment.