From 68a0ecfc22950ccdab3922a8ce2f1b8e1f45d7b6 Mon Sep 17 00:00:00 2001 From: Phil Rzewski Date: Sat, 27 Jan 2024 14:53:55 -0800 Subject: [PATCH] Use Electron's shell.openPath to open pcap slices --- apps/zui/src/plugins/brimcap/packets/download.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/zui/src/plugins/brimcap/packets/download.ts b/apps/zui/src/plugins/brimcap/packets/download.ts index 86d19357d9..678684d5da 100644 --- a/apps/zui/src/plugins/brimcap/packets/download.ts +++ b/apps/zui/src/plugins/brimcap/packets/download.ts @@ -2,9 +2,10 @@ import * as zed from "@brimdata/zed-js" import {join} from "path" import {createCli} from "../cli" import os from "os" -import {window, env, commands} from "src/zui" +import {window, commands} from "src/zui" import {queryForConnLog} from "./query-conn-log" import {DOWNLOAD} from "./types" +import {shell} from "electron" function getSearchArgsFromConn(conn: zed.Record) { const dur = conn.try("duration") as zed.Duration @@ -38,7 +39,7 @@ export async function downloadPackets(root: string, pool: string, uid: string) { const msg = JSON.parse(err)?.error || `brimcap search failed: ${err}` window.showErrorMessage(msg) } else { - env.openExternal(dest) + shell.openPath(dest) window.showSuccessMessage("Packets extracted. Opening...") } }