diff --git a/tooling/fileSmasher.ts b/tooling/fileSmasher.ts index 9f239d9..7ac690b 100644 --- a/tooling/fileSmasher.ts +++ b/tooling/fileSmasher.ts @@ -2,7 +2,7 @@ // for when you're just too lazy to // do it properly. -import { readdirSync, statSync, readFileSync, writeFileSync } from "fs"; +import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs"; let tsFileData:Array = new Array(); const tsFirstFileData:Array = new Array(); @@ -18,7 +18,7 @@ function readDir(nam:string) { // This is a very dumb way of checking for folders // protip: don't do this. - if (statSync(`${nam}/${file}`).size == 0) { + if (lstatSync(`${nam}/${file}`).isDirectory()) { readDir(`${nam}/${file}`); } else if (file.endsWith(".ts")) { if (file == "index.ts") {