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;