0
0
Fork 0
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:
Stefin 2022-07-07 02:58:49 +05:30
parent 37ae453ff7
commit b50fe88474
2 changed files with 5 additions and 3 deletions

View file

@ -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 {