Skip to content

fix: Export Dataset button reports "undefined files" and does not export#250

Open
lstein wants to merge 1 commit into
masterfrom
claude/issue-245-20260521-0228
Open

fix: Export Dataset button reports "undefined files" and does not export#250
lstein wants to merge 1 commit into
masterfrom
claude/issue-245-20260521-0228

Conversation

@lstein
Copy link
Copy Markdown
Owner

@lstein lstein commented May 21, 2026

Fixes #245

Three bugs combined to break the Export Dataset button:

  1. check_album_lock() was called with no argument in export_dataset, blocking all exports when PHOTOMAP_ALBUM_LOCKED is set.
  2. An overly-restrictive home-dir check blocked exports to external drives or network mounts.
  3. The frontend did not check response.ok, causing any server error to silently show "Exported undefined files".

Generated with Claude Code

… files

Three bugs combined to break the Export Dataset feature:

1. check_album_lock() was called with no argument in export_dataset, which
   blocks all exports whenever PHOTOMAP_ALBUM_LOCKED is set -- even for
   albums that are in the allowed list. Export is not a destructive
   album-management operation; the correct per-album lock check is already
   done inside validate_album_exists() which is called immediately after.

2. An overly-restrictive is_within_base_dir check required the export
   destination to be inside Path.home(). Users exporting to external drives
   or network mounts (e.g. /Volumes/..., /mnt/...) received a 400 error
   silently. Source-path security is handled by validate_image_access();
   no restriction on the destination is necessary.

3. The frontend export handler did not check response.ok before accessing
   data.exported. Any server-side error returned {"detail": "..."} without
   an exported field, causing the dialog to read "Exported undefined files"
   with no indication of what went wrong.

Fixes #245

Co-authored-by: Lincoln Stein <lstein@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Curate -> Export not working

1 participant