mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
Refactor search directory handling in resolve_daemon_executable function
- Changed the initialization of search_dirs from a vector to a mutable vector to allow for further modifications. - This adjustment enhances the flexibility of the search directory management, particularly for non-macOS platforms.
This commit is contained in:
@@ -32,7 +32,7 @@ pub(crate) fn resolve_daemon_executable() -> Result<PathBuf> {
|
||||
.unwrap_or_else(|| exe_dir.clone()),
|
||||
];
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let search_dirs = vec![exe_dir.clone()];
|
||||
let mut search_dirs = vec![exe_dir.clone()];
|
||||
|
||||
for dir in search_dirs.drain(..) {
|
||||
let Ok(entries) = fs::read_dir(&dir) else {
|
||||
|
||||
Reference in New Issue
Block a user