mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 12:29:57 -04:00
Let one process work in a launcher folder at a time, and one job on the same thing.
The window already locked data/launcher.lock, but a second one closed without a word, the command line did not take the lock, and nothing kept two jobs apart. The lock is now launcher/locks.py: the window, every command but check and every job that changes files hold it, the one refused says who holds it, and a job names what it changes so that a second one on the same thing fails before its first step. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,9 @@ class Layout:
|
||||
self.cache = self.data / 'cache'
|
||||
self.downloads = self.data / 'downloads'
|
||||
self.settings = self.data / 'launcher.json'
|
||||
# held by whichever process works in this folder: the window while it is open, launcher/cli.py for a command
|
||||
# and every job that changes files (launcher/locks.py)
|
||||
self.instance_lock = self.data / 'launcher.lock'
|
||||
tool_root = self.root
|
||||
if not ansi_safe(tool_root):
|
||||
tool_root = Path(os.environ.get('SystemDrive', 'C:') + '\\') / 'NX2navi'
|
||||
|
||||
Reference in New Issue
Block a user