From 1600f800e8d1f3a68adb3ae08e57ce7a30087858 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 28 Jan 2019 14:21:17 +0100 Subject: [PATCH 1/2] add a todo for flat file db atime --- storage/file.js | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/file.js b/storage/file.js index 08a9f19cd..e4a746a67 100644 --- a/storage/file.js +++ b/storage/file.js @@ -162,6 +162,7 @@ const mkOffsetCounter = () => { const readMessagesBin = (env, id, start, msgHandler, cb) => { const stream = Fs.createReadStream(mkPath(env, id), { start: start }); + // TODO get the channel and add the atime let keepReading = true; Pull( ToPull.read(stream), From 1281c9b2becbe1b2b621f040861b2e40ec8411b9 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 28 Jan 2019 15:28:38 +0100 Subject: [PATCH 2/2] remove some dead serverside code --- server.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/server.js b/server.js index 347140b7c..7e0869dba 100644 --- a/server.js +++ b/server.js @@ -211,28 +211,6 @@ var send404 = function (res, path) { }); }; -var FONT_NAME_MAP = {}; -[ './www/common/onlyoffice/fonts/' ].forEach(function (path) { - Fs.readdir(path, function (err, list) { - if (err) { throw err; } - list.forEach(function (fontName) { - FONT_NAME_MAP[fontName.toLowerCase()] = path + fontName; - }); - }); -}); - -/* Code to automatically transform font to js */ -/* Currently not active, but might be necessary */ -app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) { - var name = req.params.name.replace(/\.js$/, '').toLowerCase(); - var path = Path.join('./www/common/onlyoffice/fonts/odttf/', name); - console.log(path); - Fs.createReadStream(path).pipe(res).on('error', function (e) { - console.error(e); - res.status(404).send('No such font'); - }); -}); - /* All fonts file replaced by the list of fonts in ttf */ app.use("/common/onlyoffice/sdkjs/common/AllFonts.js", Express.static("./www/common/onlyoffice/AllFonts.js"));