mirror of https://github.com/schollz/croc.git
Fixed relative path / bug
This commit is contained in:
parent
b50fe88474
commit
d226ba536e
|
@ -286,6 +286,9 @@ func GetFilesInfo(fnames []string, zipfolder bool) (filesInfo []FileInfo, emptyF
|
|||
}
|
||||
|
||||
if stat.IsDir() && zipfolder {
|
||||
if path[len(path)-1:] != "/" {
|
||||
path += "/"
|
||||
}
|
||||
path := filepath.Dir(path)
|
||||
dest := filepath.Base(path) + ".zip"
|
||||
utils.ZipDirectory(dest, path)
|
||||
|
|
Loading…
Reference in New Issue