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 ( import (
"cwtch.im/cwtch/event" "cwtch.im/cwtch/event"
"fmt" "fmt"
"git.openprivacy.ca/openprivacy/log"
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants" "git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
"git.openprivacy.ca/cwtch.im/server" "git.openprivacy.ca/cwtch.im/server"
"git.openprivacy.ca/openprivacy/connectivity" "git.openprivacy.ca/openprivacy/connectivity"
@ -46,7 +47,10 @@ func InitServers(acn connectivity.ACN, appdir string) {
defer lock.Unlock() defer lock.Unlock()
if appServers == nil { if appServers == nil {
serversDir := path.Join(appdir, "servers") 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 = server.NewServers(acn, serversDir)
appServers.LoadServers(constants.DefactoPasswordForUnencryptedProfiles) appServers.LoadServers(constants.DefactoPasswordForUnencryptedProfiles)
} }
@ -134,4 +138,4 @@ func (si *ServerInfo) EnrichEvent(e *event.Event) {
} else { } else {
e.Data["Running"] = "false" e.Data["Running"] = "false"
} }
} }