Fix invalid rootPath when creating a new project.
[src/xds/xds-server.git] / lib / xdsconfig / folderconfig.go
index e8bff4f..f22e76f 100644 (file)
@@ -70,6 +70,10 @@ func FolderVerify(fCfg FolderConfig) error {
                err = fmt.Errorf("device id not set (SyncThingID field)")
        }
 
+       if fCfg.rootPath == "" {
+               err = fmt.Errorf("rootPath must not be empty")
+       }
+
        if err != nil {
                fCfg.Status = FolderStatusErrorConfig
                log.Printf("ERROR FolderVerify: %v\n", err)