mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 04:53:52 -06:00
fix: a lock reader refuses a missing directory
artifact_lock created its directory even for a shared reader, so a mistyped path given to --verify-packs or release_record was left as a directory holding a .lock, and split_pack created the parent before printing a bare errno. A reader now raises ArtifactDirectoryMissing, which run_cli prints on one line, and split_pack checks its target before taking the lock.
This commit is contained in:
1 parent
19dddedff6
commit
a1ddee8e5e
4 files changed
+40
-1
No files matched your search
@@ -338,6 +338,10 @@ def main() -> int:
|
||||
# The packs are rewritten in place by generate_pack under this lock: a
|
||||
# build running beside the split mixes its bytes into the pack being
|
||||
# read, or writes a pack that the split then deletes.
|
||||
if not args.target.exists():
|
||||
print(f"Error: {args.target}: no such pack or directory, pass a pack or the "
|
||||
"--output-dir generate_pack wrote (default dist/)", file=sys.stderr)
|
||||
return 1
|
||||
directory = args.target if args.target.is_dir() else args.target.parent
|
||||
try:
|
||||
with artifact_lock(str(directory)):
|
||||
|
||||
Reference in new issue
Block a user