mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-21 16:57:14 +02:00
Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
15 lines
383 B
Go
15 lines
383 B
Go
//go:build windows
|
|||
|
|||
package cache
|
|||
|
|||
import (
|
|||
"os"
|
|||
|
|||
"github.com/djherbis/stream"
|
|||
)
|
|||
|
|||
// createDataFile truncates in place: Windows refuses to unlink a file another handle
|
|||
// has open, and failing the create would break every miss on a path with a live reader.
|
|||
func createDataFile(name string) (stream.File, error) {
|
|||
return os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
|
|||
}
|