mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Replace ini packages with homebrew module
The INI format Factorio use differs from what the ini package parse and produce. Most notably no escape mechanism exists in Factorio's parser which causes instance paths containing among other thing the # character to completely break. Fix by replacing the ini package with a Factorio compatible implementation of INI parsing and serialization. Resolves the problem in #414.
This commit is contained in:
1 parent
642504874b
commit
f529457f96
5 files changed
+192
-6
No files matched your search
@@ -7,7 +7,7 @@ const events = require("events");
|
||||
const util = require("util");
|
||||
const crypto = require("crypto");
|
||||
|
||||
const ini = require("ini");
|
||||
const libIni = require("../ini");
|
||||
const rconClient = require("rcon-client");
|
||||
const libErrors = require("../errors");
|
||||
const { logger } = require("../logging");
|
||||
@@ -1167,7 +1167,7 @@ class FactorioServer extends events.EventEmitter {
|
||||
}
|
||||
|
||||
async _writeConfigIni() {
|
||||
let content = ini.encode({
|
||||
let content = libIni.stringify({
|
||||
path: {
|
||||
"read-data": this.dataPath(),
|
||||
"write-data": this.writePath(),
|
||||
|
||||
Reference in new issue
Block a user