Don't call /task/upload for websites with no results

This commit is contained in:
Richard Patel 2018-11-18 01:42:57 +01:00
parent d593ba2d0b
commit 605f6db5a5
No known key found for this signature in database
GPG Key ID: C268B2BBDA2ABECB

View File

@ -90,7 +90,10 @@ func uploadChunks(websiteId uint64, f *os.File) error {
if err != io.EOF && err != nil {
return err
}
if n < config.ChunkSize {
if n == 0 {
// Don't upload, no content
return nil
} else if n < config.ChunkSize {
err = nil
// Break at end of iteration
eof = true