Fix shell for new dir structure
This commit is contained in:
Родитель
fb428eb79a
Коммит
7137e31197
|
@ -1518,13 +1518,12 @@ function proxyEditor(cmds:string[], req, resp)
|
||||||
} else if (rel == "local") {
|
} else if (rel == "local") {
|
||||||
var mime = getMime(file)
|
var mime = getMime(file)
|
||||||
var enc = /^text\//.test(mime) ? "utf8" : null
|
var enc = /^text\//.test(mime) ? "utf8" : null
|
||||||
if (!fs.existsSync(localPath + "/" + file)) {
|
|
||||||
if (/\.css$/.test(file))
|
if (fs.existsSync(localPath + "/www/" + file))
|
||||||
localPath += "/css"
|
localPath += "/www"
|
||||||
else
|
else if (fs.existsSync(localPath + "/build/" + file))
|
||||||
localPath += "/build"
|
localPath += "/build"
|
||||||
}
|
|
||||||
info.log(file + "->" + localPath + "/" + file)
|
|
||||||
fs.readFile(localPath + "/" + file, enc, (err, data:any) => {
|
fs.readFile(localPath + "/" + file, enc, (err, data:any) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
resp.writeHead(404)
|
resp.writeHead(404)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче