aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/folders.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xdsserver/folders.go')
-rw-r--r--lib/xdsserver/folders.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/xdsserver/folders.go b/lib/xdsserver/folders.go
index fa24878..d27a329 100644
--- a/lib/xdsserver/folders.go
+++ b/lib/xdsserver/folders.go
@@ -51,8 +51,8 @@ type RegisteredCB struct {
var fcMutex = sync.NewMutex()
var ffMutex = sync.NewMutex()
-// FoldersNew Create a new instance of Model Folders
-func FoldersNew(ctx *Context) *Folders {
+// FoldersConstructor Create a new instance of Model Folders
+func FoldersConstructor(ctx *Context) *Folders {
file, _ := xdsconfig.FoldersConfigFilenameGet()
return &Folders{
Context: ctx,
@@ -74,7 +74,9 @@ func (f *Folders) LoadConfig() error {
f.Log.Infof("Use folder config file: %s", f.fileOnDisk)
err := foldersConfigRead(f.fileOnDisk, &flds)
if err != nil {
- if strings.HasPrefix(err.Error(), "No folder config") {
+ if strings.HasPrefix(err.Error(), "EOF") {
+ f.Log.Warnf("Empty folder config file")
+ } else if strings.HasPrefix(err.Error(), "No folder config") {
f.Log.Warnf(err.Error())
} else {
return err