Fixed permission error & preparing for win build
This commit is contained in:
@@ -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!")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,9 @@ export class ODLanguage extends ODManagerData {
|
||||
const filename = (file.endsWith(".json")) ? file : file+".json"
|
||||
this.file = customPath ? nodepath.join("./",customPath,filename) : nodepath.join("./languages/",filename)
|
||||
this.data = JSON.parse(fs.readFileSync(this.file).toString())
|
||||
}catch{
|
||||
throw new ODSystemError("[API ERROR] Language \""+file+"\" doesn't exist!")
|
||||
}catch(err){
|
||||
process.emit("uncaughtException",err)
|
||||
throw new ODSystemError("Language \""+nodepath.join("./",customPath ?? "./languages/",file)+"\" doesn't exist!")
|
||||
}
|
||||
if (this.data["_TRANSLATION"]) this.metadata = this.data["_TRANSLATION"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user