|
|
@ -335,7 +335,7 @@ func CompressToZip(dest string, currentPath string, paths []string) error { |
|
|
fmt.Println(err.Error()) |
|
|
fmt.Println(err.Error()) |
|
|
} |
|
|
} |
|
|
// ToSlash 过滤windows的斜杠引起的bug
|
|
|
// ToSlash 过滤windows的斜杠引起的bug
|
|
|
zfile, err := os.Create(path.Join(filesPath, dest)) |
|
|
zfile, err := os.Create(path.Join("./sync_zips", "/", dest)) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
@ -409,7 +409,8 @@ func CompressToZip(dest string, currentPath string, paths []string) error { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 存到指定位置
|
|
|
// 存到指定位置
|
|
|
os.Rename(dest, path.Join("./sync_zips/", dest)) |
|
|
// os.Rename(dest, path.Join("./sync_zips/", dest))
|
|
|
|
|
|
os.Rename(path.Join("./sync_zips/", dest), path.Join(filesPath, dest)) |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|