Skip to content

Commit 1e32a04

Browse files
committed
fix: build errors in macOS and Windows app scanning
1 parent 18aeadd commit 1e32a04

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src-tauri/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,8 @@ fn get_installed_apps() -> Vec<AppInfo> {
653653
let name = dict.get("CFBundleDisplayName")
654654
.or_else(|| dict.get("CFBundleName"))
655655
.and_then(|v| v.as_string())
656-
.unwrap_or_else(|| entry.file_name().to_string_lossy().replace(".app", ""))
657-
.to_string();
656+
.map(|s| s.to_string())
657+
.unwrap_or_else(|| entry.file_name().to_string_lossy().replace(".app", ""));
658658

659659
let version = dict.get("CFBundleShortVersionString")
660660
.or_else(|| dict.get("CFBundleVersion"))
@@ -680,6 +680,7 @@ fn get_installed_apps() -> Vec<AppInfo> {
680680
version,
681681
install_path: path.to_string_lossy().to_string(),
682682
icon_path,
683+
size_bytes: 0,
683684
});
684685
}
685686
}
@@ -721,6 +722,7 @@ fn get_installed_apps() -> Vec<AppInfo> {
721722
version,
722723
install_path,
723724
icon_path,
725+
size_bytes: 0,
724726
});
725727
}
726728
}
@@ -737,7 +739,7 @@ fn get_installed_apps() -> Vec<AppInfo> {
737739
}
738740

739741
#[tauri::command]
740-
fn uninstall_app(id: String, path: String) -> Result<(), String> {
742+
fn uninstall_app(_id: String, path: String) -> Result<(), String> {
741743
#[cfg(target_os = "linux")]
742744
{
743745
use std::process::Command;

0 commit comments

Comments
 (0)