fixed paths
This commit is contained in:
@@ -242,7 +242,16 @@ def main():
|
||||
if not p.exists():
|
||||
sys.exit(f"ERROR: {label} file not found: {p}")
|
||||
|
||||
out = Path(args.output) if args.output else gbr.with_suffix('.pm4n')
|
||||
if args.output:
|
||||
out = Path(args.output)
|
||||
else:
|
||||
# If in 'output/gerbers/', default to 'output/pm4n/'
|
||||
parent = gbr.parent
|
||||
if parent.name == 'gerbers' and parent.parent.name == 'output':
|
||||
out = parent.parent / 'pm4n' / gbr.with_suffix('.pm4n').name
|
||||
else:
|
||||
out = gbr.with_suffix('.pm4n')
|
||||
|
||||
pos_mm = None
|
||||
if args.pos:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user