diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-02-03 02:02:23 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-02-03 02:02:23 +0300 |
commit | 610f866bdc7a61847351fbf5fc67417c9ba3b1b7 (patch) | |
tree | 6045df123297ba9deff86fcd9f2e21f361bb5e56 /lib/storage.js | |
parent | fd13be21374455fd8676d9ed0c4f8d85282a9659 (diff) |
fix file.createReadStream regression
`opts` param is optional
Diffstat (limited to 'lib/storage.js')
-rw-r--r-- | lib/storage.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/storage.js b/lib/storage.js index 911e978..539d83b 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -259,6 +259,7 @@ File.prototype.deselect = function () { */ File.prototype.createReadStream = function (opts) { var self = this + if (!opts) opts = {} if (opts.pieceLength == null) opts.pieceLength = self.pieceLength var stream = new FileStream(self, opts) self.storage.emit('select', stream.startPiece, stream.endPiece, true, stream.notify.bind(stream)) |