f5d5f487eb
Add a function to make a directory and intervening directories, honoring core.sharedRepository. To do so, add a utility function to perform an operation with the umask set to a certain value. This is required because os.MkdirAll honors the umask and is potentially recursive (so we can't fix things after creating them). Without temporarily setting the umask, it isn't possible to create directories with the right permissions if those permissions are looser than the original umask.
8 lines
99 B
Go
8 lines
99 B
Go
// +build windows
|
|
|
|
package tools
|
|
|
|
func doWithUmask(mask int, f func() error) error {
|
|
return f()
|
|
}
|