Wire up writeAttachment
This commit is contained in:
parent
aa82a2a5fb
commit
e0428355be
5 changed files with 27 additions and 3 deletions
7
main.js
7
main.js
|
@ -16,6 +16,7 @@ const {
|
|||
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const Attachments = require('./app/attachments');
|
||||
const autoUpdate = require('./app/auto_update');
|
||||
const createTrayIcon = require('./app/tray_icon');
|
||||
const GlobalErrors = require('./js/modules/global_errors');
|
||||
|
@ -417,7 +418,7 @@ app.on('ready', () => {
|
|||
let loggingSetupError;
|
||||
logging.initialize().catch((error) => {
|
||||
loggingSetupError = error;
|
||||
}).then(() => {
|
||||
}).then(async () => {
|
||||
/* eslint-enable more/no-then */
|
||||
logger = logging.getLogger();
|
||||
logger.info('app ready');
|
||||
|
@ -431,6 +432,10 @@ app.on('ready', () => {
|
|||
locale = loadLocale({ appLocale, logger });
|
||||
}
|
||||
|
||||
console.log('Ensure attachments directory exists');
|
||||
const userDataPath = app.getPath('userData');
|
||||
await Attachments.ensureDirectory(userDataPath);
|
||||
|
||||
ready = true;
|
||||
|
||||
autoUpdate.initialize(getMainWindow, locale.messages);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue