cgserver 9.2.3 → 9.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ const jsonc_1 = require("jsonc");
6
6
  class Config {
7
7
  _is_init = false;
8
8
  _file_name = "";
9
+ _suffix = "";
9
10
  /**
10
11
  * 是否是debug调试模式,主要区别于读取数据档,debug默认读取file_d文件,release默认读取file_r文件,如果不存在都会读取file文件
11
12
  */
@@ -25,7 +26,7 @@ class Config {
25
26
  if (Config.debug) {
26
27
  suffix2 = "_d/";
27
28
  }
28
- let path = Config.rootDataDir + suffix2 + this._file_name + ".json";
29
+ let path = Config.rootDataDir + suffix2 + this._file_name + this._suffix + ".json";
29
30
  path = path.toLowerCase();
30
31
  if (!fs.existsSync(path)) {
31
32
  console.error(path + " not exist!");
@@ -12,6 +12,7 @@ class IServerConfig extends FrameworkConfig_1.FrameworkConfig {
12
12
  constructor(server_name) {
13
13
  super();
14
14
  this._server_name = server_name;
15
+ this._suffix = this._server_name;
15
16
  }
16
17
  init() {
17
18
  let ret = super.init();
@@ -1,6 +1,7 @@
1
1
  export declare class Config {
2
2
  protected _is_init: boolean;
3
3
  protected _file_name: string;
4
+ protected _suffix: string;
4
5
  /**
5
6
  * 是否是debug调试模式,主要区别于读取数据档,debug默认读取file_d文件,release默认读取file_r文件,如果不存在都会读取file文件
6
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "9.2.3",
3
+ "version": "9.2.4",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",