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") {
|
||||
var mime = getMime(file)
|
||||
var enc = /^text\//.test(mime) ? "utf8" : null
|
||||
if (!fs.existsSync(localPath + "/" + file)) {
|
||||
if (/\.css$/.test(file))
|
||||
localPath += "/css"
|
||||
else
|
||||
localPath += "/build"
|
||||
}
|
||||
info.log(file + "->" + localPath + "/" + file)
|
||||
|
||||
if (fs.existsSync(localPath + "/www/" + file))
|
||||
localPath += "/www"
|
||||
else if (fs.existsSync(localPath + "/build/" + file))
|
||||
localPath += "/build"
|
||||
|
||||
fs.readFile(localPath + "/" + file, enc, (err, data:any) => {
|
||||
if (err) {
|
||||
resp.writeHead(404)
|
||||
|
|
Загрузка…
Ссылка в новой задаче