This commit is contained in:
Copilot 2026-03-11 14:48:23 +01:00 committed by GitHub
commit 7fd064ee23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,8 +18,13 @@ const scriptPath = path.join(dataPath, 'scripts/');
const logPath = path.join(dataPath, 'log/'); const logPath = path.join(dataPath, 'log/');
const uploadPath = path.join(dataPath, 'upload/'); const uploadPath = path.join(dataPath, 'upload/');
const bakPath = path.join(dataPath, 'bak/'); const bakPath = path.join(dataPath, 'bak/');
const dbPath = path.join(dataPath, 'db/');
const repoPath = path.join(dataPath, 'repo/');
const rawPath = path.join(dataPath, 'raw/');
const dependenceCachePath = path.join(dataPath, 'dep_cache/');
const samplePath = path.join(rootPath, 'sample/'); const samplePath = path.join(rootPath, 'sample/');
const tmpPath = path.join(logPath, '.tmp/'); const tmpPath = path.join(logPath, '.tmp/');
const updateLogPath = path.join(logPath, 'update/');
const confFile = path.join(configPath, 'config.sh'); const confFile = path.join(configPath, 'config.sh');
const sampleConfigFile = path.join(samplePath, 'config.sample.sh'); const sampleConfigFile = path.join(samplePath, 'config.sample.sh');
const sampleTaskShellFile = path.join(samplePath, 'task.sample.sh'); const sampleTaskShellFile = path.join(samplePath, 'task.sample.sh');
@ -44,11 +49,16 @@ const directories = [
preloadPath, preloadPath,
logPath, logPath,
tmpPath, tmpPath,
updateLogPath,
uploadPath, uploadPath,
sshPath, sshPath,
bakPath, bakPath,
sshdPath, sshdPath,
systemLogPath, systemLogPath,
dbPath,
repoPath,
rawPath,
dependenceCachePath,
]; ];
const files = [ const files = [
@ -104,7 +114,7 @@ const files = [
export default async () => { export default async () => {
for (const dirPath of directories) { for (const dirPath of directories) {
if (!(await fileExist(dirPath))) { if (!(await fileExist(dirPath))) {
await fs.mkdir(dirPath); await fs.mkdir(dirPath, { recursive: true });
} }
} }