Fixed permission error & preparing for win build

This commit is contained in:
DJj123dj
2024-08-22 21:22:19 +02:00
parent 5e2e0417dc
commit 177ab95dba
5 changed files with 20 additions and 12 deletions
+3 -2
View File
@@ -90,8 +90,9 @@ export class ODJsonConfig extends ODConfig {
const filename = (file.endsWith(".json")) ? file : file+".json"
this.file = customPath ? nodepath.join("./",customPath,filename) : nodepath.join("./config/",filename)
this.data = JSON.parse(fs.readFileSync(this.file).toString())
}catch{
throw new ODSystemError("config \""+nodepath.join("./",customPath ?? "",file)+"\" doesn't exist!")
}catch(err){
process.emit("uncaughtException",err)
throw new ODSystemError("Config \""+nodepath.join("./",customPath ?? "./config/",file)+"\" doesn't exist!")
}
}
}