Skip to content

fix(project): accept legacy version 3 project files - #178

Draft
doogie99 wants to merge 1 commit into
ScanTailor-Advanced:masterfrom
doogie99:fix/accept-legacy-project-version
Draft

fix(project): accept legacy version 3 project files#178
doogie99 wants to merge 1 commit into
ScanTailor-Advanced:masterfrom
doogie99:fix/accept-legacy-project-version

Conversation

@doogie99

@doogie99 doogie99 commented Aug 4, 2026

Copy link
Copy Markdown

Problem

v1.2.0 bumped PROJECT_VERSION from 3 to 4, and both ProjectReader and ProjectOpeningContext check the file's version with strict equality. Every project created with 4lex4-era builds or with this project's own releases up to v1.1.x (all of which wrote version 3) is rejected with "The project file is not compatible with the current application version" — even though the v4 readers handle v3 content fine via attribute fallbacks (e.g. obliqueModeFromXml's fallback chain for the deskew params added in v1.2.0).

This hits exactly the users the community fork most wants to migrate: people coming from the abandoned upstream with existing projects.

Fix

Accept versions 3 through PROJECT_VERSION in both check sites. Versions below 3 (original ScanTailor lineage) remain rejected, as the readers were never written for them. Files are upgraded to version 4 on the next save, since ProjectWriter always writes the current version.

Testing

Opened a real-world 46-image/90-page project written by a 4lex4-era build (version 3): loads with all page splits, deskew angles, content boxes, and output settings intact; saving rewrites it as version 4. Built and tested on macOS 26 (arm64, Qt 6.11).

🤖 Generated with Claude Code

Projects from 4lex4-era forks and v1.1.x store format version 3; the
readers already handle their content via attribute fallbacks, but the
strict equality check against PROJECT_VERSION rejected them. Accept
versions 3 through PROJECT_VERSION.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant