fix Cmd and CopyFile
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -100,6 +101,11 @@ func (a *App) CopyFile(src string, dst string) error {
|
||||
}
|
||||
defer sourceFile.Close()
|
||||
|
||||
err = os.MkdirAll(dst[:strings.LastIndex(dst, "/")], 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
destFile, err := os.Create(dst)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user