Skip to content

Commit 3a8e96e

Browse files
committed
fix for mac
1 parent b6bb6ff commit 3a8e96e

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/macos.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use rayon::iter::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterato
1010
use std::fs;
1111
use std::path::{Path, PathBuf};
1212
use std::process::exit;
13+
use crate::utils::index_dirs_from_config;
1314

1415
#[cfg(target_os = "macos")]
1516
pub fn set_activation_policy_accessory() {
@@ -217,9 +218,14 @@ pub fn get_installed_macos_apps(config: &Config) -> Vec<App> {
217218
"/System/Applications/Utilities/".to_string(),
218219
];
219220

220-
paths
221+
222+
let mut apps = paths
221223
.par_iter()
222224
.map(|path| get_installed_apps(path, store_icons))
223225
.flatten()
224-
.collect()
226+
.collect();
227+
index_dirs_from_config(&mut apps);
228+
229+
apps
230+
225231
}

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ pub fn get_installed_apps(config: &Config) -> Vec<App> {
302302
use crate::macos::get_installed_macos_apps;
303303
get_installed_macos_apps(config)
304304
} else {
305-
use crate::windows::get_installed_apps_windows;
306-
get_installed_apps_windows()
305+
use crate::windows::get_installed_windows_apps;
306+
get_installed_windows_apps()
307307
}
308308
}

src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn get_windows_path(folder_id: &GUID) -> Option<String> {
119119
}
120120
}
121121
#[cfg(target_os = "windows")]
122-
pub fn get_installed_apps_windows() -> Vec<App> {
122+
pub fn get_installed_windows_apps() -> Vec<App> {
123123
let mut apps = Vec::new();
124124
get_apps_from_registry(&mut apps);
125125
get_apps_from_known_folder(&mut apps);

0 commit comments

Comments
 (0)