优化auto

This commit is contained in:
songzhibin97
2020-11-08 07:52:15 +08:00
parent 5c94c73004
commit 08e9c6b38a
2 changed files with 45 additions and 18 deletions

View File

@@ -21,10 +21,11 @@ func FileMove(src string, dst string) (err error) {
return err
}
var revoke = false
dir := filepath.Dir(dst)
Redirect:
_, err = os.Stat(filepath.Dir(dst))
_, err = os.Stat(dir)
if err != nil {
err = os.MkdirAll(filepath.Dir(dst), 0755)
err = os.MkdirAll(dir, 0755)
if err != nil {
return err
}