summaryrefslogtreecommitdiffstats
path: root/lib/xdsconfig/folderconfig.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-13 23:13:42 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-13 23:13:42 +0200
commit87f390b37d51a4c8777d27836389e86e78c690d1 (patch)
treebe1089fa33f118f9bdf9e762a5f88a94ee0759d1 /lib/xdsconfig/folderconfig.go
parent7ecaccbae9b7741d8a285b98885e786dc1d4c79c (diff)
Fix invalid rootPath when creating a new project.
Diffstat (limited to 'lib/xdsconfig/folderconfig.go')
-rw-r--r--lib/xdsconfig/folderconfig.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xdsconfig/folderconfig.go b/lib/xdsconfig/folderconfig.go
index e8bff4f..f22e76f 100644
--- a/lib/xdsconfig/folderconfig.go
+++ b/lib/xdsconfig/folderconfig.go
@@ -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)