- if ( $rcode >= 200 && $rcode <= 299
- // double check that the disk is not full/broken
- && $tmpFiles[$path]->getSize() == $rhdrs['content-length']
- ) {
- // good
+ if ( $rcode >= 200 && $rcode <= 299 ) {
+ // Double check that the disk is not full/broken
+ if ( $tmpFiles[$path]->getSize() != $rhdrs['content-length'] ) {
+ $tmpFiles[$path] = null;
+ $rerr = "Got {$tmpFiles[$path]->getSize()}/{$rhdrs['content-length']} bytes";
+ $this->onError( null, __METHOD__,
+ array( 'src' => $path ) + $ep, $rerr, $rcode, $rdesc );
+ }