mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
create default archive by default
This commit is contained in:
parent
7ec23ecca4
commit
a588d72b26
@ -42,18 +42,23 @@ function datadir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
const dirFunc = (dirname, clean) => () => {
|
||||
const dirFunc =
|
||||
(dirname, clean, subdirs = []) =>
|
||||
() => {
|
||||
const dir = path.join(datadir(), dirname);
|
||||
ensureDirectory(dir, clean);
|
||||
for (const subdir of subdirs) {
|
||||
ensureDirectory(path.join(dir, subdir), false);
|
||||
}
|
||||
|
||||
return dir;
|
||||
};
|
||||
};
|
||||
|
||||
const jsldir = dirFunc('jsl', true);
|
||||
const rundir = dirFunc('run', true);
|
||||
const uploadsdir = dirFunc('uploads', true);
|
||||
const pluginsdir = dirFunc('plugins');
|
||||
const archivedir = dirFunc('archive');
|
||||
const archivedir = dirFunc('archive', false, ['default']);
|
||||
const appdir = dirFunc('apps');
|
||||
const filesdir = dirFunc('files');
|
||||
const logsdir = dirFunc('logs', 3600 * 24 * 7);
|
||||
|
Loading…
Reference in New Issue
Block a user