Skip to content

Exclude dotfiles from project video and pose file discovery - #410

Merged
gbeane merged 1 commit into
mainfrom
fix/exclude-dotfiles-from-video-scan
Jul 14, 2026
Merged

Exclude dotfiles from project video and pose file discovery#410
gbeane merged 1 commit into
mainfrom
fix/exclude-dotfiles-from-video-scan

Conversation

@gbeane

@gbeane gbeane commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Initializing or loading a JABS project stored on a macOS external drive (exFAT/NTFS)
crashed during the video scan with:

OSError: Unable to synchronously open file (file signature not found)

macOS writes an AppleDouble sidecar (._<name>) next to every file on non-APFS/HFS+
volumes. Unlike the shell, pathlib.Path.glob("*") matches these leading-dot files, so
the scan treated ._video.mp4 as a real video and handed its companion
._video_pose_est_v8.h5 sidecar (which is not valid HDF5) to h5py.

Fix

Skip dotfiles at the two directory-discovery sites:

  • VideoManager.get_videos() no longer returns names beginning with ..
  • ProjectPaths.create_directories() validation (has_video / has_pose) ignores
    dotfiles, so a directory containing only sidecars is correctly rejected as "not a valid
    JABS project" instead of falsely passing.

Tests

  • test_video_manager.py::test_get_videos_excludes_dotfiles
  • test_project_paths.py::test_create_directories_ignores_dotfile_videos_and_poses
  • test_project_paths.py::test_create_directories_validates_real_project

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a macOS-on-external-drive crash during JABS project discovery by ensuring leading-dot “sidecar” files (notably AppleDouble ._*) are ignored when scanning for videos and validating project structure.

Changes:

  • Update VideoManager.get_videos() to skip dotfiles during video discovery.
  • Update ProjectPaths.create_directories() validation to ignore dotfile videos and pose HDF5 sidecars.
  • Add tests covering both dotfile exclusion and validation behavior for real vs. sidecar-only directories.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/project/test_video_manager.py Adds regression test ensuring get_videos() excludes dotfiles (including AppleDouble sidecars).
tests/project/test_project_paths.py Adds validation tests to ensure dotfile-only directories are rejected and real projects pass even with sidecars present.
src/jabs/project/video_manager.py Filters out dotfile entries during video enumeration to avoid treating AppleDouble sidecars as videos.
src/jabs/project/project_paths.py Filters out dotfiles during “has_video/has_pose” validation so sidecar-only dirs don’t look like valid projects.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gbeane gbeane self-assigned this Jul 13, 2026
@gbeane
gbeane merged commit 4bdbe43 into main Jul 14, 2026
6 checks passed
@gbeane
gbeane deleted the fix/exclude-dotfiles-from-video-scan branch July 14, 2026 19:24
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.

3 participants