Commit graph

1 commit

Author SHA1 Message Date
Charles Dusek
ed28bef1cb core/rawdb: fix freezer dir.Sync() failure on Windows
The atomicRename function calls dir.Sync() on a directory handle,
which is not supported on Windows and returns "Access is denied".
This caused truncateTail and resetTo to fail after already closing
the index file, leaving it in a closed state for subsequent reads.

Extract the directory sync into a platform-specific syncDir()
function: a no-op on Windows, and the existing fsync-with-EINVAL-
handling on Unix. This follows the same pattern already used in
triedb/pathdb/fileutils_{unix,windows}.go.

Fixes #34114
2026-03-29 10:46:59 -05:00