test: Create logs dir on app startup.

This commit is contained in:
akashnimare
2017-12-19 01:22:50 +05:30
parent 3b014e0715
commit 562e82d2f1
3 changed files with 16 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
const fs = require('fs');
const { app } = require('electron').remote;
const logDir = `${app.getPath('userData')}/Logs/`;
const initSetUp = () => {
if (!fs.existsSync(logDir)) {
fs.mkdirSync(logDir);
}
};
module.exports = {
initSetUp
};