make server functionality create servers dir on init #44

Merged
sarah merged 3 commits from macosBuild into trunk 2021-11-05 20:33:53 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit e966392233 - Show all commits

View File

@ -3,12 +3,12 @@ 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"
"git.openprivacy.ca/openprivacy/log"
"os"
"path"
"path/filepath"
"sync"
)
@ -46,7 +46,7 @@ func InitServers(acn connectivity.ACN, appdir string) {
lock.Lock()
defer lock.Unlock()
if appServers == nil {
serversDir := path.Join(appdir, "servers")
serversDir := filepath.Join(appdir, "servers")
err := os.MkdirAll(serversDir, 0700)
if err != nil {
log.Errorf("Could not init servers directory: %s", err)