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

Better error handling

This commit is contained in:
Zack Scholl 2017-10-21 14:38:27 -06:00
parent 0f5b52ff35
commit 79c81a3c5d

View file

@ -389,6 +389,7 @@ func (c *Connection) receiveFile(id int, connection net.Conn) error {
logger.Debugf("chunk size: %d", chunkSize)
os.Remove(c.File.Name + ".enc." + strconv.Itoa(id))
log.Debug("Making " + c.File.Name + ".enc." + strconv.Itoa(id))
newFile, err := os.Create(c.File.Name + ".enc." + strconv.Itoa(id))
if err != nil {
panic(err)