Fixed Qdrant removal for Linux devices

This commit is contained in:
PaulKoudelka 2026-06-02 17:19:06 +02:00
parent 308f78803f
commit 0e38bc657f

View File

@ -398,10 +398,16 @@ fn remove_obsolete_qdrant_sidecar_files<R: tauri::Runtime>(app_handle: &tauri::A
paths.push(resource_dir.join("resources").join("databases").join("qdrant"));
}
if let Ok(current_exe) = std::env::current_exe() && let Some(exe_dir) = current_exe.parent() {
paths.push(exe_dir.join("target").join("databases").join("qdrant"));
paths.push(exe_dir.join("qdrant.exe"));
paths.push(exe_dir.join("qdrant"));
cfg_if::cfg_if! {
if #[cfg(any(target_os = "windows", target_os = "macos"))]{
if let Ok(current_exe) = std::env::current_exe() && let Some(exe_dir) = current_exe.parent() {
if (current_exe.to_string_lossy().contains("MindWork AI Studio")) {
paths.push(exe_dir.join("target").join("databases").join("qdrant"));
paths.push(exe_dir.join("qdrant.exe"));
paths.push(exe_dir.join("qdrant"));
}
}
}
}
for path in paths {
@ -411,6 +417,7 @@ fn remove_obsolete_qdrant_sidecar_files<R: tauri::Runtime>(app_handle: &tauri::A
fn remove_obsolete_qdrant_path(path: &Path) {
if !path.exists() {
info!(Source = "Qdrant Edge"; "Obsolete file or directory '{}' was not found.", path.display());
return;
}