2021-07-28 19:18:38 +03:00
|
|
|
package util
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
2022-04-21 14:28:05 +03:00
|
|
|
// MkdirAllX calls os.MkdirAll with the passed permissions
|
|
|
|
// but with +x for a user and a group. This makes the created
|
2021-07-28 19:18:38 +03:00
|
|
|
// dir openable regardless of the passed permissions.
|
|
|
|
func MkdirAllX(path string, perm os.FileMode) error {
|
2023-10-31 14:56:55 +03:00
|
|
|
return os.MkdirAll(path, perm|0o110)
|
2021-07-28 19:18:38 +03:00
|
|
|
}
|