Skip to content

Commit

Permalink
errorHandle: core.Send now returns errors thrown by f.stat()
Browse files Browse the repository at this point in the history
  • Loading branch information
tarithj committed Feb 1, 2021
1 parent 6a1cd96 commit a7beeb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ func Send(callback SendDataCallback, fileLocation string, randomNumber string) e
if err != nil {
return err
}

s, err := f.Stat()
if err != nil {
return err
}

dataSize := s.Size()

err = SendData(callback, f, randomNumber, dataSize)
return err
}
Expand Down

0 comments on commit a7beeb7

Please sign in to comment.