Skip to content

Fix Et Tu's MASTER.DAT step failing with a misleading message - #1

Merged
cerels merged 2 commits into
mainfrom
claude/relaxed-johnson-km0zgn
Oct 23, 2026
Merged

cerels merged 2 commits into
mainfrom
claude/relaxed-johnson-km0zgn

Conversation

@cerels

@cerels cerels commented Oct 22, 2026

Copy link
Copy Markdown
Owner

A player selecting the MASTER.DAT from their Steam Fallout 1 folder kept getting "That doesn't look like Fallout 1's MASTER.DAT - check the path and try again."

Cause

gui::errors::friendly() rewrote any error containing "master.dat" into that message. On Windows, extract_fallout1_data always refused with "Automatic extraction isn't available on Windows - run UNDAT.EXE ... point it at Fallout 1's MASTER.DAT", so every attempt showed up as a bad-path error, whichever file was picked. On Linux/macOS, the same rewrite could also hide unrelated failures. That goes against ADR 0009's rule of never hiding a cause behind a guess.

Changes

  • friendly() now matches only the two bad-file messages that Et Tu's undat.sh/undat.bat print themselves ("Please pass path to Fallout 1's master.dat…" and "Error: can't read Fallout 1's master.dat.").
  • On Windows, extract_fallout1_data now runs Et Tu's bundled undat.bat. Current releases (v2.0.3911) package it with utils/dat2.exe, according to Fo1in2's package.yml. It runs with CREATE_NO_WINDOW because the launcher is a GUI-subsystem app. If undat.bat is missing (older releases), it falls back to the manual UNDAT.EXE instructions, and that message is no longer rewritten.

Testing

  • cargo test: 255 passed, including new tests for both rewrite cases.
  • cargo check --target x86_64-pc-windows-gnu: compiles, with no new warnings.
  • Not tested: running undat.bat on a real Windows machine with an actual Steam MASTER.DAT.
  • cargo fmt --check already fails on main in files this PR doesn't touch, so I didn't reformat them here.

Generated by Claude Code

friendly() rewrote any error mentioning "master.dat" into "That doesn't
look like Fallout 1's MASTER.DAT", which hid the real cause. On Windows
that was every attempt: extract_fallout1_data refused outright with
"run UNDAT.EXE yourself ... MASTER.DAT", and the rewrite turned it into a
bad-path error no matter which file was picked.

- friendly() now matches only undat.sh/undat.bat's own two bad-file
  messages.
- On Windows, run Et Tu's bundled undat.bat (shipped alongside
  utils/dat2.exe in current releases) with no console window, falling
  back to the manual UNDAT.EXE instructions only if it's missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsaLBvEnJ6B8w98YE5adiP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsaLBvEnJ6B8w98YE5adiP
@cerels
cerels merged commit 7928474 into main Oct 23, 2026
1 check passed
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.

2 participants