Skip to content

Commit

Permalink
Merge branch 'release/1.5.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpauk committed Jun 4, 2024
2 parents 7e268fe + ac074c4 commit 9c0c831
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Options:
// пустая строка: использовать значение по умолчанию - inpx-файл, что найдется в директории библиотеки
"inpx": "",

// конфигурационный файл для фильра по авторам и книгам (см. ниже)
// конфигурационный файл для фильтра по авторам и книгам (см. ниже)
// пустая строка: использовать значение по умолчанию - файл filter.json в директории файла конфигурации
"inpxFilterFile": "",

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inpx-web",
"version": "1.5.7",
"version": "1.5.8",
"author": "Book Pauk <bookpauk@gmail.com>",
"license": "CC0-1.0",
"repository": "bookpauk/inpx-web",
Expand Down
9 changes: 5 additions & 4 deletions server/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ConfigManager {
return instance;
}

async init(tempDataDir, configFile) {
async init(defaultDataDir, configFile) {
if (this.inited)
throw new Error('already inited');

Expand All @@ -69,14 +69,15 @@ class ConfigManager {
this.branchConfigFile = __dirname + `/${this.branch}.js`;
const config = require(this.branchConfigFile);

if (!tempDataDir) {
tempDataDir = `${config.execDir}/.${config.name}`;
if (!defaultDataDir) {
defaultDataDir = `${config.execDir}/.${config.name}`;
}

if (configFile) {
config.configFile = path.resolve(configFile);
} else {
config.configFile = `${tempDataDir}/config.json`;
await fs.ensureDir(defaultDataDir);
config.configFile = `${defaultDataDir}/config.json`;
}

this._config = config;
Expand Down

0 comments on commit 9c0c831

Please sign in to comment.