2 Commits

Author SHA1 Message Date
Flowseal
03c7719c39 mutex check simplify 2026-04-14 16:58:54 +03:00
Flowseal
db4cebe0b2 build test 2026-04-14 16:51:26 +03:00
2 changed files with 2 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
python-version: "3.11"
cache: "pip"
- name: Setup MSVC 14.40 toolset

View File

@@ -383,14 +383,9 @@ def run_tray() -> None:
def main() -> None:
if mutex_result := _acquire_win_mutex() is False:
if (mutex_result := _acquire_win_mutex()) is False or mutex_result is None and not acquire_lock():
_show_info("Приложение уже запущено.", os.path.basename(sys.argv[0]))
return
if mutex_result is None:
log.warning("Named mutex unavailable, falling back to lock file")
if not acquire_lock():
_show_info("Приложение уже запущено.", os.path.basename(sys.argv[0]))
return
try:
run_tray()