diff options
Diffstat (limited to 'src/files.js')
-rw-r--r-- | src/files.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/files.js b/src/files.js index 876ff4e..1af4a18 100644 --- a/src/files.js +++ b/src/files.js | |||
@@ -88,7 +88,7 @@ function get(req, res, next) { | |||
88 | debug('get', absoluteFilePath); | 88 | debug('get', absoluteFilePath); |
89 | 89 | ||
90 | if (!result.isDirectory() && !result.isFile()) return next(new HttpError(500, 'unsupported type')); | 90 | if (!result.isDirectory() && !result.isFile()) return next(new HttpError(500, 'unsupported type')); |
91 | if (result.isFile()) return res.sendFile(absoluteFilePath); | 91 | if (result.isFile()) return res.download(absoluteFilePath); |
92 | 92 | ||
93 | async.map(fs.readdirSync(absoluteFilePath), function (filePath, callback) { | 93 | async.map(fs.readdirSync(absoluteFilePath), function (filePath, callback) { |
94 | fs.stat(path.join(absoluteFilePath, filePath), function (error, result) { | 94 | fs.stat(path.join(absoluteFilePath, filePath), function (error, result) { |