0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

Unzipping file at the reciever end

This commit is contained in:
Stefin 2022-07-07 00:06:11 +05:30
parent ee772c4cec
commit 37ae453ff7

View file

@ -908,6 +908,16 @@ func (c *Client) transfer() (err error) {
}
}
if c.SuccessfulTransfer && !c.Options.IsSender {
for _, file := range c.FilesToTransfer {
if file.TempFile {
utils.UnzipDirectory(".", file.Name)
os.Remove(file.Name)
log.Debugf("Removing %s\n", file.Name)
}
}
}
if c.Options.Stdout && !c.Options.IsSender {
pathToFile := path.Join(
c.FilesToTransfer[c.FilesToTransferCurrentNum].FolderRemote,