fix: clear thumbnail cache and temp dirs on new session
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,3 +35,10 @@ pub async fn extract_thumbnails(
|
||||
.await
|
||||
.map_err(|e| format!("Task failed: {e}"))?
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn cleanup_thumbnails(paths: Vec<String>) -> Result<(), String> {
|
||||
tokio::task::spawn_blocking(move || thumbnail_extractor::cleanup_thumbnail_dirs(&paths))
|
||||
.await
|
||||
.map_err(|e| format!("Task failed: {e}"))?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user