mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 19:51:57 +08:00
create trilium data directory if it doesn't exist, closes #491
This commit is contained in:
parent
f0e22b70f6
commit
36c6376220
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,10 @@ const DIR_NAME = 'trilium-data';
|
|||
|
||||
function getTriliumDataDir() {
|
||||
if (process.env.TRILIUM_DATA_DIR) {
|
||||
if (!fs.existsSync(process.env.TRILIUM_DATA_DIR)) {
|
||||
fs.mkdirSync(process.env.TRILIUM_DATA_DIR, 0o700);
|
||||
}
|
||||
|
||||
return process.env.TRILIUM_DATA_DIR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue