mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Fix error on dash in instance name
Fix stripPaths logic breaking when the instance name contains RegExp meta characters due to a lack of escaping.
This commit is contained in:
1 parent
4c9b91ab57
commit
31c0925354
2 files changed
+11
-1
No files matched your search
@@ -554,7 +554,7 @@ class FactorioServer extends events.EventEmitter {
|
||||
this._stripRegExp = new RegExp(
|
||||
`(${escapeRegExp(this.writePath("temp", "currently-playing", path.sep))})|` +
|
||||
`(${escapeRegExp(this.writePath(path.sep))})|` +
|
||||
`(\\.\\.\\.[${chars}]*?currently-playing\\${path.sep})`,
|
||||
`(\\.\\.\\.[${escapeRegExp(chars)}]*?currently-playing\\${path.sep})`,
|
||||
"g"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user