Ticket #7801: fix-eof-0.23.patch
File fix-eof-0.23.patch, 824 bytes (added by , 14 years ago) |
---|
-
mythweb/modules/stream/stream_raw.pl
old new 116 116 while (sysread DATA, $buffer, $read_size ) { 117 117 print $buffer; 118 118 $size -= $read_size; 119 if ($size == 0) { 120 last; 119 if ($size <= 0) { 120 my $fileSize = -s $filename; 121 my $filePos = tell DATA; 122 if ( ($fileSize - $filePos) > 0 ) { 123 $size = $fileSize - $filePos; 124 } 125 else { 126 last; 127 } 121 128 } 122 129 if ($size < $read_size) { 123 130 $read_size = $size; 124 131 } 125 } 132 if ($read_size < 0) { 133 $read_size = 0; 134 } 135 } 126 136 close DATA; 127 137 128 138 1;