From e5929d9268a5c017319556087f3b0ebd49fca6f6 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 23 Apr 2025 17:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/relativelyPath.js | 5 +++++ lib/config/configControl.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 constants/relativelyPath.js diff --git a/constants/relativelyPath.js b/constants/relativelyPath.js new file mode 100644 index 0000000..19564c5 --- /dev/null +++ b/constants/relativelyPath.js @@ -0,0 +1,5 @@ +const relativelyPath = { + config: '/data/crystelf/config.json', +}; + +export default relativelyPath; diff --git a/lib/config/configControl.js b/lib/config/configControl.js index b1bd8ff..ec1f815 100644 --- a/lib/config/configControl.js +++ b/lib/config/configControl.js @@ -2,10 +2,11 @@ import Path, { defaultConfig } from '../../constants/path.js'; import fc from '../../components/json.js'; import path from 'path'; import fs from 'fs'; +import relativelyPath from '../../constants/relativelyPath.js'; const configPath = Path.config; const configFile = path.join(configPath, 'config.json'); -const configDir = 'data/crystelf/config.json'; +const configDir = relativelyPath.config; let configCache = {}; let lastModified = 0;