fix sending file with prefix "croc-stdin" renaming on receiver end

This commit is contained in:
Abhishek 2022-02-03 23:09:37 +05:30
parent 94c0f66a26
commit 9f66842322
1 changed files with 1 additions and 1 deletions

View File

@ -841,7 +841,7 @@ func (c *Client) processMessageFileInfo(m message.Message) (done bool, err error
if len(fi.Name) > c.longestFilename {
c.longestFilename = len(fi.Name)
}
if strings.HasPrefix(fi.Name, "croc-stdin-") {
if strings.HasPrefix(fi.Name, "croc-stdin-") && c.Options.SendingText {
c.FilesToTransfer[i].Name, err = utils.RandomFileName()
if err != nil {
return