1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2025-09-05 21:10:16 +02:00

Made server run async

This commit is contained in:
zneix 2020-08-27 00:39:06 +02:00
parent 78aabf90bb
commit f3288c4e39
3 changed files with 28 additions and 23 deletions

View file

@ -46,7 +46,7 @@ FileDocumentStore.prototype.set = function(key, data, callback, skipExpire) {
// Get data from a file from key
FileDocumentStore.prototype.get = function(key, callback, skipExpire) {
const _this = this;
const fn = this.basePath + '/' + FileDocumentStore.md5(key);
const fn = require('path').join(this.basePath, FileDocumentStore.md5(key));
fs.readFile(fn, 'utf8', function(err, data) {
if (err) {
callback(false);