Unzipping file at the reciever end

This commit is contained in:
Stefin 2022-07-07 00:06:11 +05:30
parent ee772c4cec
commit 37ae453ff7
1 changed files with 10 additions and 0 deletions

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,