mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 10:27:08 +02:00
Unlinking before re-creating fixes the premature-EOF spin on unix, but Windows refuses to remove a file another handle still has open and returns a sharing violation. Because Create surfaces that error, every cache miss on a path with a live reader would have failed outright - worse than the spin it was meant to fix. Split the create behind a build tag: unix unlinks for a fresh inode, Windows keeps truncating in place and stays exposed to the spin, which is the behaviour it already had. The unix-only spec is skipped there. |
||
|---|---|---|
| .. | ||
| benchmark_test.go | ||
| cache_suite_test.go | ||
| cached_http_client.go | ||
| cached_http_client_test.go | ||
| file_caches.go | ||
| file_caches_test.go | ||
| file_haunter.go | ||
| file_haunter_test.go | ||
| simple_cache.go | ||
| simple_cache_test.go | ||
| spread_fs.go | ||
| spread_fs_test.go | ||
| spread_fs_unix.go | ||
| spread_fs_windows.go | ||