mirror of https://github.com/schollz/croc.git
Unzipping file at the reciever end
This commit is contained in:
parent
ee772c4cec
commit
37ae453ff7
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue