Better error handling

This commit is contained in:
Zack Scholl 2017-10-21 14:38:27 -06:00
parent 0f5b52ff35
commit 79c81a3c5d
1 changed files with 1 additions and 0 deletions

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)