From 0d71cde9414cdd8cd79c31d7776c3d300d6e9ceb Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sat, 30 Jun 2018 12:02:42 -0700 Subject: [PATCH] carry over file info --- src/api.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/api.go b/src/api.go index 07db150..af7a7b3 100644 --- a/src/api.go +++ b/src/api.go @@ -76,11 +76,16 @@ func (c *Croc) Send(fname string, codePhrase string) (err error) { go d.startServer() e := Init() e.WebsocketAddress = "ws://127.0.0.1:8140" + c.cs.Lock() e.cs.Lock() - c.cs.channel.codePhrase = codePhrase - c.cs.channel.Channel = codePhrase[:3] - c.cs.channel.passPhrase = codePhrase[3:] + e.cs.channel.codePhrase = codePhrase + e.cs.channel.Channel = codePhrase[:3] + e.cs.channel.passPhrase = codePhrase[3:] + e.cs.channel.fileMetaData = c.cs.channel.fileMetaData + e.crocFile = c.crocFile + e.crocFileEncrypted = e.crocFileEncrypted e.cs.Unlock() + c.cs.Unlock() runClientError <- e.client(0, channel) }()