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

Chmod new file based on the source file mode

This commit is contained in:
stefins 2023-02-10 14:48:44 +05:30
parent 8b9977a7c4
commit 24679d4e02
No known key found for this signature in database
GPG key ID: CC24E0B98BA67B50

View file

@ -1386,6 +1386,10 @@ func (c *Client) recipientInitializeFile() (err error) {
log.Error(errOpen) log.Error(errOpen)
return errOpen return errOpen
} }
errChmod := os.Chmod(pathToFile, c.FilesToTransfer[c.FilesToTransferCurrentNum].Mode.Perm())
if errChmod != nil {
log.Error(errChmod)
}
truncate = true truncate = true
} }
if truncate { if truncate {