解决了打开文件时有黑框的bug

This commit is contained in:
2024-10-12 16:00:32 +08:00
parent 7a6f815597
commit 88439dfb81
3 changed files with 14 additions and 17 deletions
+6
View File
@@ -1,6 +1,7 @@
package utils
import (
"fmt"
"io"
"os"
"os/exec"
@@ -93,3 +94,8 @@ func (*FileUtils) WinOpenFolder(folderPath string) error {
//_, err = Exec.Command(fmt.Sprintf("explorer %s", f), dir)
//return err
}
func (*FileUtils) WinOpenFile(dir string, fileName string) error {
_, err := Exec.Command(fmt.Sprintf("cmd /c start %s", fileName), dir)
return err
}