server: fix path resolves

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

View file

@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.7.2",
"version": "1.7.3",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "jean-emmanuel@ammd.net"

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) {}
}