mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
Fixed relative path / bug
This commit is contained in:
parent
b50fe88474
commit
d226ba536e
1 changed files with 3 additions and 0 deletions
|
@ -286,6 +286,9 @@ func GetFilesInfo(fnames []string, zipfolder bool) (filesInfo []FileInfo, emptyF
|
||||||
}
|
}
|
||||||
|
|
||||||
if stat.IsDir() && zipfolder {
|
if stat.IsDir() && zipfolder {
|
||||||
|
if path[len(path)-1:] != "/" {
|
||||||
|
path += "/"
|
||||||
|
}
|
||||||
path := filepath.Dir(path)
|
path := filepath.Dir(path)
|
||||||
dest := filepath.Base(path) + ".zip"
|
dest := filepath.Base(path) + ".zip"
|
||||||
utils.ZipDirectory(dest, path)
|
utils.ZipDirectory(dest, path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue