X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxdsconfig%2Fconfig.go;h=801891b3ced56243dfabcbc0989ccea5983e02a1;hb=87f390b37d51a4c8777d27836389e86e78c690d1;hp=df98439e99d7558e3e1ee51fa1e2008358d34de2;hpb=7ecaccbae9b7741d8a285b98885e786dc1d4c79c;p=src%2Fxds%2Fxds-server.git diff --git a/lib/xdsconfig/config.go b/lib/xdsconfig/config.go index df98439..801891b 100644 --- a/lib/xdsconfig/config.go +++ b/lib/xdsconfig/config.go @@ -186,6 +186,12 @@ func (c *Config) UpdateAll(newCfg Config) error { // UpdateFolder updates a specific folder into the current configuration func (c *Config) UpdateFolder(newFolder FolderConfig) (FolderConfig, error) { + // rootPath should not be empty + if newFolder.rootPath == "" { + newFolder.rootPath = c.ShareRootDir + } + + // Sanity check of folder settings if err := FolderVerify(newFolder); err != nil { return FolderConfig{}, err }