mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
Merge pull request #589 from zx9597446/main
zip file bug on windows and linux
This commit is contained in:
commit
cff8cddd13
1 changed files with 1 additions and 0 deletions
|
@ -402,6 +402,7 @@ func ZipDirectory(destination string, source string) (err error) {
|
|||
}
|
||||
defer f1.Close()
|
||||
zipPath := strings.ReplaceAll(path, source, strings.TrimSuffix(destination, ".zip"))
|
||||
zipPath = filepath.ToSlash(zipPath)
|
||||
w1, err := writer.Create(zipPath)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue