In short
- The dialog means your original file doesn’t match the one the patch author used. The patch itself is almost certainly fine.
- Since version 3.1.2, Delta Patcher shows it for exactly two xdelta3 errors:
target window checksum mismatchandsource file too short. - Find the exact version the readme names (region, revision, header, dump) and check its checksum.
- The patch inspector tests your file against the patch and shows any source file name it records.
The message
The patch could not be applied:
The file you are trying to patch is not the right one.
Delta Patcher added this wording in version 3.1.2, when the developer hid the log by default and introduced “a more user friendly message” for “common patching errors (most notably checksum mismatch)”, in the changelog’s words. Before 3.1.2, you saw the raw xdelta3 error instead.
Where it comes from
When a patch fails, Delta Patcher looks at xdelta3’s error text. If it contains source file too short or target window checksum mismatch, you get this dialog. Every other failure gets “The patch could not be applied: See log for more information.” So the dialog is reliable shorthand for one of two situations:
| Log message | What happened | Guide |
|---|---|---|
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT | The rebuilt data didn’t match the checksum in the patch, so your original has different bytes | Checksum mismatch |
xdelta3: source file too short: XD3_INVALID_INPUT | The patch needs data past the end of your original, so your file is smaller than the author’s | Source file too short |
To see which you have, click the log button at the bottom right of the Delta Patcher window.
How to fix it
-
Read what the patch expects
Hover over the patch field for the Patch info tooltip, read the readme, or drop the patch into the patch inspector. xdelta3-made patches often record the original’s exact file name.
-
Check your file’s checksum
Compare your file’s CRC32, MD5 or SHA-1 with the readme’s value using the file hasher. If they differ, the patch will never apply to this file.
-
Get the matching version
Look at region, revision, header and trimming. How to tell versions apart. A file you already patched once also counts as “not the right one”.
-
Test before you patch
Add the new file to the patch inspector: its dry run tells you whether it matches without writing anything. Then apply with Delta Patcher or the online patcher.
What not to do
- Don’t turn off Checksum validation to get past it. The patch would “succeed” and write a corrupt file. The message exists to stop that.
- Don’t keep re-downloading the patch. A damaged patch produces different errors.
- Don’t rename your file. xdelta3 compares bytes, not names.
Frequently asked questions
I patched this file before and it worked. Why not now?
If you didn’t keep a backup, the file you’re patching may already be the patched version. A patched file is a different file. Restore the original first. How to undo a patch.
Is this a bug in Delta Patcher?
Almost never. The same patch and file fail the same way in xdelta3 and every compatible patcher. If a file really does match the author’s published checksum and still fails only in Delta Patcher, report it on the issue tracker with the log.
Can a patch have several valid originals?
No. An XDelta patch is built against one exact file. Authors who support several versions publish a separate patch for each.