server: fix path resolves

This commit is contained in:
bordun 2020-11-22 18:17:05 +01:00
parent b809229132
commit 2c7e3d3d4b
2 changed files with 3 additions and 2 deletions

View file

@ -102,8 +102,9 @@ function httpRoute(req, res) {
for (var i = -1; i < resolveDirs.length; i++) {
var p = i === -1 ? sessionPath : resolveDirs[i]
p = path.resolve(path.join(p, url))
try {
res.sendFile(path.resolve(p, url))
res.sendFile(p)
return true
} catch(e) {}
}