Skip to content

Commit

Permalink
Don't warn about ignored assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibowl committed Sep 18, 2020
1 parent 74742c4 commit 7c319d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/proxy/mod/patcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ async function prepareDir(dir, modMeta, allowScripts, path = []) {
let type = path[path.length-1]
let target, targetName = f + (modMeta.name||"") + (modMeta.version||"")

if (type !== "original" && type !== "patched" && type !== "patcher") {
if (type !== "original" && type !== "patched" && type !== "patcher" && type !== "ignore") {
if (f.startsWith("original")) type = "original"
else if (f.startsWith("patched")) type = "patched"
else if (f.startsWith("patcher")) type = "patcher"
else if (f.startsWith("ignore")) return
else {
Logger.error(`Invalid path ${filePath}`)
return
Expand All @@ -69,7 +70,9 @@ async function prepareDir(dir, modMeta, allowScripts, path = []) {
} else
target = "/" + path.slice(0, path.length-1).join("/")

if (type == "patcher") {
if (type == "ignore")
return
else if (type == "patcher") {
if (!allowScripts) return
delete require.cache[require.resolve(filePath)]
}
Expand Down

0 comments on commit 7c319d4

Please sign in to comment.