浏览代码

no longer spams the console with errors when non-existant files are edited

master
mortie 7 年前
父节点
当前提交
1520bc0866
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      js/slideshow.js

+ 4
- 1
js/slideshow.js 查看文件

@@ -32,7 +32,10 @@ function sendFile(path, res) {
});

fs.createReadStream(path)
.on("error", err => error(err, res))
.on("error", err => {
res.writeHead(404);
res.end(err.toString());
})
.pipe(res);
}


正在加载...
取消
保存