mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
create trilium data directory if it doesn't exist, closes #491
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user