Skip to content

Blocking syscall in async open_in_finder command #16

@codehakase

Description

@codehakase

Description

open_in_finder (src-tauri/src/lib.rs:589-602) is declared async but calls std::process::Command::output() synchronously, which blocks the Tokio runtime thread:

#[tauri::command]
async fn open_in_finder(file_path: String) -> Result<(), String> {
    let output = std::process::Command::new("open")
        .arg("-R")
        .arg(&file_path)
        .output()  // blocking!
        ...
}

Per the AGENTS.md guidelines: "Avoid blocking the async runtime; offload heavy work to threads."

Suggested fix

Use tauri_plugin_shell (already a dependency) or tokio::process::Command instead of std::process::Command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions