From 3f712a4e60f7e9bf59035dce7fafe99440666b7b Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 21:07:56 +0000 Subject: [PATCH] E8: keep the extensions profile under the state dir at a path lock cleanup accepts cleanSingletonLocks only cleans directories named chromium-profile, so the BROWSE_EXTENSIONS_DIR profile moves to /extensions/chromium-profile. --- browse/src/browser-manager.ts | 2 +- browse/test/headless-launch-options.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browse/src/browser-manager.ts b/browse/src/browser-manager.ts index 2d863bd1b..03410fda5 100644 --- a/browse/src/browser-manager.ts +++ b/browse/src/browser-manager.ts @@ -583,7 +583,7 @@ export class BrowserManager { } if (extensionsDir) { - const profileDir = require('path').join(resolveConfig().stateDir, 'chromium-extensions-profile'); + const profileDir = require('path').join(resolveConfig().stateDir, 'extensions', 'chromium-profile'); require('fs').mkdirSync(profileDir, { recursive: true, mode: 0o700 }); cleanSingletonLocks(profileDir); this.context = await launchWithXProtectHeal(() => chromium.launchPersistentContext(profileDir, { diff --git a/browse/test/headless-launch-options.test.ts b/browse/test/headless-launch-options.test.ts index f727c31a0..dbe40b26b 100644 --- a/browse/test/headless-launch-options.test.ts +++ b/browse/test/headless-launch-options.test.ts @@ -71,7 +71,7 @@ describe.skipIf(process.platform !== 'linux')('headless launch options (Linux, r const session = bm.getActiveSession(); await handleWriteCommand('goto', [`http://127.0.0.1:${server.port}/`], session, bm); expect(await session.getPage().evaluate(() => document.documentElement.getAttribute('data-probe-ext'))).toBe('1'); - expect(fs.existsSync(path.join(scratch, 'state', 'chromium-extensions-profile'))).toBe(true); + expect(fs.existsSync(path.join(scratch, 'state', 'extensions', 'chromium-profile'))).toBe(true); } finally { server.stop(true); }