Skip to content

Launcher: build apworlds with files dated before 1980#6271

Open
patrickwehbe wants to merge 1 commit into
ArchipelagoMW:mainfrom
patrickwehbe:fix/apworld-strict-timestamps
Open

Launcher: build apworlds with files dated before 1980#6271
patrickwehbe wants to merge 1 commit into
ArchipelagoMW:mainfrom
patrickwehbe:fix/apworld-strict-timestamps

Conversation

@patrickwehbe

Copy link
Copy Markdown
Contributor

What is this fixing or adding?

Building an .apworld via the launcher's "Build APWorlds" component crashes with ValueError: ZIP does not support timestamps before 1980 when any file in the world folder has a modification time outside the ZIP format's representable range (e.g. a pre-1980 mtime left over from checkout or extraction).

Passing strict_timestamps=False to ZipFile (the standard-library option for exactly this situation) clamps such timestamps to the ZIP minimum instead of raising, so the build succeeds.

Fixes #5505.

How was this tested?

Reproduced the crash and confirmed the fix with a minimal repro: a file given a pre-1980 mtime via os.utime(f, (0, 0)). With the default ZipFile it raises ValueError: ZIP does not support timestamps before 1980; adding strict_timestamps=False writes the archive without error.

Building an .apworld via the launcher's "Build APWorlds" component crashed with
"ValueError: ZIP does not support timestamps before 1980" when any file in the world
folder had a modification time outside the ZIP format's representable range (e.g. a
pre-1980 mtime from checkout/extraction).

Pass strict_timestamps=False to ZipFile so such timestamps are clamped to the ZIP
minimum instead of raising, allowing the build to succeed.

Fixes ArchipelagoMW#5505.
@github-actions github-actions Bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: apworld builder errors with out of range file timestamps

1 participant