From a125f80535ecca33cbd7eeac312de224558a186a Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Fri, 17 Jun 2016 16:33:58 +0800 Subject: [PATCH] Fix pdf tmp path is missing a folder slash before timestamp --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 1ed3a5b0..3064d321 100644 --- a/lib/response.js +++ b/lib/response.js @@ -296,7 +296,7 @@ function actionPDF(req, res, note) { if (!fs.existsSync(config.tmppath)) { fs.mkdirSync(config.tmppath); } - var path = config.tmppath + Date.now() + '.pdf'; + var path = config.tmppath + '/' + Date.now() + '.pdf'; markdownpdf().from.string(body).to(path, function () { var stream = fs.createReadStream(path); var filename = title;