This commit is contained in:
kim
2026-05-10 12:00:01 +09:00
parent 82bda7409e
commit c26f9b431b
155 changed files with 5923 additions and 4073 deletions
+4 -3
View File
@@ -469,13 +469,14 @@ def resolve_image_path(image_path: str, project_dir: str, workspace_path: str) -
if os.path.exists(c):
print(f"[pptx_gen] resolve_image_path: {image_path} -> {c} (found)", file=sys.stderr, flush=True)
return c
# Fallback: search by filename in all subdirectories
# Fallback: search by filename within project_dir only (NOT workspace-wide — generic names like
# slide2_image.jpg would match other projects' images and corrupt the presentation)
basename = os.path.basename(image_path).lower()
for root, dirs, files in os.walk(workspace_path):
for root, dirs, files in os.walk(project_dir):
for f in files:
if f.lower() == basename:
resolved = os.path.join(root, f)
print(f"[pptx_gen] resolve_image_path: {image_path} -> {resolved} (found by filename search)", file=sys.stderr, flush=True)
print(f"[pptx_gen] resolve_image_path: {image_path} -> {resolved} (found in project_dir)", file=sys.stderr, flush=True)
return resolved
print(f"[pptx_gen] resolve_image_path: {image_path} NOT FOUND in {project_dir} or {workspace_path}", file=sys.stderr, flush=True)
return candidates[0] # return first even if missing (placeholder will show)