mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 17:38:47 +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() {
|
||||
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…
x
Reference in New Issue
Block a user