diff --git a/app/main.ts b/app/main.ts index 9b91e98dd..f800b722c 100644 --- a/app/main.ts +++ b/app/main.ts @@ -94,7 +94,7 @@ import type { MenuActionType } from '../ts/types/menu'; import { createTemplate } from './menu'; import { installFileHandler, installWebHandler } from './protocol_filter'; import * as OS from '../ts/OS'; -import { isProduction } from '../ts/util/version'; +import { isBeta, isProduction } from '../ts/util/version'; import { isSgnlHref, isCaptchaHref, @@ -120,6 +120,18 @@ import type { LoggerType } from '../ts/types/Logging'; const animationSettings = systemPreferences.getAnimationSettings(); +if ( + OS.isMacOS() && + !isProduction(app.getVersion()) && + !isBeta(app.getVersion()) +) { + systemPreferences.setUserDefault( + 'SquirrelMacEnableDirectContentsWrite', + 'boolean', + true + ); +} + // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow: BrowserWindow | undefined;