Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(automation): open files directly instead of revealing them

Richie McIlroy6630b19445c3
diff --git a/apps/desktop/src-tauri/src/automation.rs b/apps/desktop/src-tauri/src/automation.rs
index 4f7915e22..2d7e4d363 100644
--- a/apps/desktop/src-tauri/src/automation.rs
+++ b/apps/desktop/src-tauri/src/automation.rs
@@ -258,13 +258,21 @@ impl AutomationHost for DesktopAutomationHost {
}
async fn open_file(&self, ctx: &TriggerContext) -> Result<(), String> {
+ use tauri_plugin_opener::OpenerExt;
+
let path = ctx
.image_path
.as_ref()
.or(ctx.output_path.as_ref())
.ok_or("No file path available to open")?;
- reveal_path(path)
+ let path_str = path.to_str().ok_or("Invalid path")?;
+ self.app
+ .opener()
+ .open_path(path_str, None::<String>)
+ .map_err(|e| format!("Failed to open file: {e}"))?;
+
+ Ok(())
}
async fn run_command(