fix(single-instance): quit when the lock is lost

requestSingleInstanceLock() without a quit on failure means the second
process falls through to whenReady() and opens a duplicate window (what
Avi saw: two Folios from one icon click). Now the loser forwards to the
running window (second-instance) and exits. Pairs with the launcher
TMPDIR pin — uwsm per-scope /tmp made the singleton socket invisible, so
the lock never even failed before.
This commit is contained in:
avi 2026-10-05 17:48:04 -05:00
commit ced074a3a0

View file

@ -1423,4 +1423,8 @@ if (app.requestSingleInstanceLock()) {
}
if (f) openFromArg(f);
});
} else {
// Lost the lock: another Folio is already running. Without this quit the
// second process falls through to whenReady() and opens a duplicate window.
app.quit();
}