@@ -33,25 +33,25 @@ CopyFromStream.prototype._handleChunk = function (string, encoding) {
33
33
dataChunk = new Buffer ( string , encoding ) ;
34
34
}
35
35
if ( this . _buffer . length ) {
36
- //Buffer.concat is better, but it's missing
36
+ //Buffer.concat is better, but it's missing
37
37
//in node v0.6.x
38
- tmpBuffer = new Buffer ( this . _buffer . length + dataChunk . length ) ;
39
- this . _buffer . copy ( tmpBuffer ) ;
38
+ tmpBuffer = new Buffer ( this . _buffer . length + dataChunk . length ) ;
39
+ this . _buffer . copy ( tmpBuffer ) ;
40
40
dataChunk . copy ( tmpBuffer , this . _buffer . length ) ;
41
41
this . _buffer = tmpBuffer ;
42
42
} else {
43
43
this . _buffer = dataChunk ;
44
44
}
45
45
}
46
-
46
+
47
47
return this . _sendIfConnectionReady ( ) ;
48
48
} ;
49
49
CopyFromStream . prototype . _sendIfConnectionReady = function ( ) {
50
50
var dataSent = false ;
51
51
if ( this . _connection ) {
52
52
dataSent = this . _connection . sendCopyFromChunk ( this . _buffer ) ;
53
53
this . _buffer = new Buffer ( 0 ) ;
54
- if ( this . _dataBuffered ) {
54
+ if ( this . _dataBuffered ) {
55
55
this . emit ( 'drain' ) ;
56
56
}
57
57
this . _dataBuffered = false ;
@@ -84,7 +84,7 @@ CopyFromStream.prototype.end = function (string, encondig) {
84
84
} ;
85
85
CopyFromStream . prototype . error = function ( error ) {
86
86
if ( this . _error || this . _closed ) {
87
- return false ;
87
+ return false ;
88
88
}
89
89
this . _error = true ;
90
90
this . emit ( 'error' , error ) ;
@@ -171,7 +171,7 @@ CopyToStream.prototype.resume = function () {
171
171
this . _outputDataChunk ( ) ;
172
172
if ( this . _error ) {
173
173
return this . emit ( 'error' , this . _error ) ;
174
- }
174
+ }
175
175
if ( this . _finished ) {
176
176
return this . emit ( 'end' ) ;
177
177
}
0 commit comments