aboutsummaryrefslogtreecommitdiff
path: root/config/app.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-01-12 16:32:20 +0100
committerJulien Dessaux2021-01-12 16:32:20 +0100
commit3a977a74499b45e91364d0f704a7a7ee48a5351f (patch)
tree530294926d2834db0e62ab07a6620f3c4e9b1e25 /config/app.go
parentWrote a minimal config and refactored all tests from it to simplify everything (diff)
downloadshell-game-launcher-3a977a74499b45e91364d0f704a7a7ee48a5351f.tar.gz
shell-game-launcher-3a977a74499b45e91364d0f704a7a7ee48a5351f.tar.bz2
shell-game-launcher-3a977a74499b45e91364d0f704a7a7ee48a5351f.zip
Improved config App tests
Diffstat (limited to '')
-rw-r--r--config/app.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/app.go b/config/app.go
index d7d1051..2eefb98 100644
--- a/config/app.go
+++ b/config/app.go
@@ -28,8 +28,8 @@ func (a *App) validate() error {
if err := os.MkdirAll(a.WorkingDirectory, 0700); err != nil {
return errors.Wrapf(err, "Invalid WorkingDirectory : %s", a.WorkingDirectory)
}
- if err := unix.Access(a.WorkingDirectory, unix.W_OK); err != nil {
- return errors.Wrapf(err, "Invalid WorkingDirectory : %s", a.WorkingDirectory)
+ if err := unix.Access(a.WorkingDirectory, unix.W_OK|unix.R_OK|unix.X_OK); err != nil {
+ return errors.Wrapf(err, "invalid WorkingDirectory : %s", a.WorkingDirectory)
}
// MaxUsers
if a.MaxUsers <= 0 {