Files
kandev/apps/backend/internal/plugins/approval_store_sync_unix.go
T
2026-09-15 23:16:06 +01:00

18 lines
393 B
Go

//go:build !windows
package plugins
import "os"
// syncApprovalLedgerDirectory flushes the rename metadata on platforms that
// expose directory handles to fsync. The ledger file is already synced before
// the rename.
func syncApprovalLedgerDirectory(path string) error {
dir, err := os.Open(path)
if err != nil {
return err
}
defer func() { _ = dir.Close() }()
return dir.Sync()
}