From 4cd445bf77285d4d73c6da783b8d100f6a7baa4c Mon Sep 17 00:00:00 2001 From: josc146 Date: Mon, 5 Jun 2023 22:55:06 +0800 Subject: [PATCH] OpenFileFolder for linux --- backend-golang/file.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend-golang/file.go b/backend-golang/file.go index 48eb759..05c5552 100644 --- a/backend-golang/file.go +++ b/backend-golang/file.go @@ -140,7 +140,12 @@ func (a *App) OpenFileFolder(path string) error { } return nil case "linux": - println("unsupported OS") + cmd := exec.Command("xdg-open", absPath) + err := cmd.Run() + if err != nil { + return err + } + return nil } return errors.New("unsupported OS") }