Skip to content

Windows: flush the v1 backup through a writable handle - #58

Merged
adamski merged 4 commits into
mainfrom
adam/windows-v1-backup-flush
Oct 19, 2026
Merged

adamski merged 4 commits into
mainfrom
adam/windows-v1-backup-flush

Conversation

@adamski

@adamski adamski commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Windows refuses FlushFileBuffers on a read-only handle. write_backup flushed the .v1-backup.tmp copy through File::open, so on Windows every 0.6 data dir failed its pre-migration backup with ErrorMigrationFailed and never opened. Reported by a Windows tester on Entonal Studio 2.0.0-alpha.14 (replicant-client 0.7.1): the library would not open and the user's tunings did not show. The v1 file is untouched, because the backup runs before migration 015.

  • test: runs the unit tests on windows-latest as well as Linux, and adds a host test that attaches to a v1 data dir through host::attach (canonicalised path, backup, migration).
  • fix: flushes the copy through a handle opened for writing.

The test commit is pushed first, so the Windows job should fail on attaching_to_a_v1_data_dir_backs_it_up_and_migrates_it before the fix lands. This is also the first Windows run of the full unit suite, so unrelated Windows failures may show up.

… host

The v1 backup before migrating has only ever run on Linux and macOS.
Windows refuses FlushFileBuffers on a read-only handle, so every 0.6 data
dir failed its pre-migration backup there and never opened.
A Windows checkout converts it to CRLF, so the staleness check failed there.
@adamski
adamski merged commit 03a2ac4 into main Oct 19, 2026
7 of 8 checks 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.

1 participant