Merge pull request #456 from abhi12299/filenamePrefix

Fix renaming of file with prefix "croc-stdin" on receiver end
This commit is contained in:
Zack 2022-02-23 07:52:27 -08:00 committed by GitHub
commit 030ed2a03d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -891,7 +891,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