diff --git a/index.js b/index.js index 99fc1d5..0364b59 100644 --- a/index.js +++ b/index.js @@ -109,6 +109,11 @@ if (!fs.existsSync(startFile)) { // Create autostartup file const autostartupFile = path.join(app.getPath('home'), '.config', 'autostart', 'wallify.desktop'); +const autostartupDir = path.dirname(autostartupFile); +if (!fs.existsSync(autostartupDir)) { + console.log('Creating autostartup directory...'); + fs.mkdirSync(autostartupDir, { recursive: true }); +} if (!fs.existsSync(autostartupFile)) { console.log('Creating autostartup file...'); const user = require('os').userInfo().username;