79263924

Date: 2024-12-09 05:35:21
Score: 0.5
Natty:
Report link

In production __dirname will resolve to the ASAR. To combat this, use app.getAppPath() if the app is packaged:

const { app } = require('electron');

const rootPath = app.isPackaged ? app.getAppPath() : __dirname;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: bn0