mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
Added support for sending relative folder
This commit is contained in:
parent
37ae453ff7
commit
b50fe88474
2 changed files with 5 additions and 3 deletions
|
@ -286,7 +286,8 @@ func GetFilesInfo(fnames []string, zipfolder bool) (filesInfo []FileInfo, emptyF
|
|||
}
|
||||
|
||||
if stat.IsDir() && zipfolder {
|
||||
dest := path + ".zip"
|
||||
path := filepath.Dir(path)
|
||||
dest := filepath.Base(path) + ".zip"
|
||||
utils.ZipDirectory(dest, path)
|
||||
stat, errStat = os.Lstat(dest)
|
||||
if errStat != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue