Skip to content

Commit

Permalink
fix: hold a lock when setting up prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Oct 22, 2024
1 parent d2d0338 commit 1f950cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from subprocess import Popen
from typing import Any

from filelock import FileLock
from Xlib import X, Xatom, display
from Xlib.error import DisplayConnectionError
from Xlib.protocol.request import GetProperty
Expand Down Expand Up @@ -817,8 +818,11 @@ def main() -> int: # noqa: D103
opts = args[1] # Reference the executable options
check_env(env, thread_pool)

UMU_LOCAL.mkdir(parents=True, exist_ok=True)

# Prepare the prefix
setup_pfx(env["WINEPREFIX"])
with FileLock(f"{UMU_LOCAL}/pfx.lock"):
setup_pfx(env["WINEPREFIX"])

# Configure the environment
set_env(env, args)
Expand Down

0 comments on commit 1f950cc

Please sign in to comment.