mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
create trilium data directory if it doesn't exist, closes #491
This commit is contained in:
parent
f0e22b70f6
commit
36c6376220
@ -36,6 +36,10 @@ const DIR_NAME = 'trilium-data';
|
|||||||
|
|
||||||
function getTriliumDataDir() {
|
function getTriliumDataDir() {
|
||||||
if (process.env.TRILIUM_DATA_DIR) {
|
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;
|
return process.env.TRILIUM_DATA_DIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user