解决了打开文件时有黑框的bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user