4cf30300ee
On Windows, syscall.Umask doesn't exist, and trying to compile with it doesn't work. Add two files, controlled by build tags, that return the umask on Unix systems and return a no-op default on Windows, so that we can compile on all platforms.
14 lines
222 B
Go
14 lines
222 B
Go
// +build !windows
|
|
|
|
package config
|
|
|
|
import "syscall"
|
|
|
|
func umask() int {
|
|
// umask(2), which this function wraps, also sets the umask, so set it
|
|
// back.
|
|
umask := syscall.Umask(022)
|
|
syscall.Umask(umask)
|
|
return umask
|
|
}
|