fix perms
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Dan Ballard 2021-11-05 16:16:13 -04:00
parent 85a90658b9
commit d519a4d0b2
1 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package servers
import (
"cwtch.im/cwtch/event"
"fmt"
"git.openprivacy.ca/openprivacy/log"
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
"git.openprivacy.ca/cwtch.im/server"
"git.openprivacy.ca/openprivacy/connectivity"
@ -46,7 +47,10 @@ func InitServers(acn connectivity.ACN, appdir string) {
defer lock.Unlock()
if appServers == nil {
serversDir := path.Join(appdir, "servers")
os.MkdirAll(serversDir, 700)
err := os.MkdirAll(serversDir, 0700)
if err != nil {
log.Errorf("Could not init servers directory: %s", err)
}
appServers = server.NewServers(acn, serversDir)
appServers.LoadServers(constants.DefactoPasswordForUnencryptedProfiles)
}
@ -134,4 +138,4 @@ func (si *ServerInfo) EnrichEvent(e *event.Event) {
} else {
e.Data["Running"] = "false"
}
}
}