diff --git a/index.js b/index.js index 81ec0b3..43c25b2 100644 --- a/index.js +++ b/index.js @@ -435,8 +435,8 @@ SendStream.prototype.isRangeFresh = function isRangeFresh () { */ SendStream.prototype.redirect = function redirect (path) { - if (listenerCount(this, 'directory') !== 0) { - this.emit('directory') + if (listenerCount(this, 'directory')) { + this.emit('directory', path) return }