blob: 5ba24c17522ad7cd39124028a71c0f9a62264cee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package game
import (
"thehouseoficarus/internal/persistence"
)
// writeRoomFile durably writes an authored world/content file: temp file +
// rename + directory fsync. The in-game admin room commands previously used a
// bare os.WriteFile, which can truncate world data if the process dies
// mid-write.
func writeRoomFile(path string, data []byte) error {
return persistence.WriteFile(path, data, 0644)
}
|