Skip to content

Fix: OSX file metadata messing with workfiles zips - #142

Merged
kalisp merged 1 commit into
ynput:developfrom
Tilix4:bugfix/osx_file_metadata
Aug 4, 2026
Merged

Fix: OSX file metadata messing with workfiles zips#142
kalisp merged 1 commit into
ynput:developfrom
Tilix4:bugfix/osx_file_metadata

Conversation

@Tilix4

@Tilix4 Tilix4 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Changelog Description

Ignoring OSX file system metadata during zip/unzip processes to avoid messed structures.

Additional review information

In case you ingest manually (tray publisher) harmony scenes you zipped using finder's tool the associated __MACOSX directory breaks the unzipping process.

Testing notes:

  1. Create a harmony workfile zip using Finder's archive tool.
  2. Ingest it using Tray publisher
  3. Open it using regular ayon launcher

@BigRoy
BigRoy requested review from Copilot and iLLiCiTiT August 3, 2026 18:31
@BigRoy BigRoy added type: bug Something isn't working community Issues and PRs coming from the community members labels Aug 3, 2026

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 updates the Harmony client zip/unzip logic to ignore macOS Finder-generated metadata entries (e.g. __MACOSX/, ._*, .DS_Store) so workfile archives unzip into the expected scene structure when ingested (e.g. via Tray Publisher) and opened via AYON Launcher.

Changes:

  • Add _is_macos_metadata_entry helper to detect macOS metadata/junk zip entries.
  • Filter out macOS metadata from unzip_scene_file’s name list and skip extracting those entries.
  • Skip adding macOS metadata files when creating archives in zip_and_move.
Suppressed comments (1)

client/ayon_harmony/api/lib.py:519

  • main_name = next(...) will raise StopIteration when the archive (after filtering macOS metadata) contains no .xstage entry, resulting in a confusing exception instead of a clear user-facing error. Consider guarding this and raising an explicit Exception (or a more specific error) when no .xstage is present.
            names = [
                name for name in zip_ref.namelist()
                if not _is_macos_metadata_entry(name)
            ]
            main_name = next(
                Path(name).stem
                for name in names
                if name.endswith(".xstage")
            )

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

@kalisp kalisp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kalisp
kalisp merged commit 453fd88 into ynput:develop Aug 4, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues and PRs coming from the community members type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants