aboutsummaryrefslogtreecommitdiffstats
path: root/lib/folder/folder-pathmap.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 10:50:12 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 16:00:04 +0100
commit8d3f51e52894d46a4a92a944bc09f4ceaa1abf51 (patch)
tree1d4315736ce539c8618f26838d5145a28008ba63 /lib/folder/folder-pathmap.go
parentb1708565ee2b4d725bb98c6b015f16af3d2a097e (diff)
Fixed folder ID and label generation.
Folder ID is now a simple uuid (without sub-string of label)
Diffstat (limited to 'lib/folder/folder-pathmap.go')
-rw-r--r--lib/folder/folder-pathmap.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/folder/folder-pathmap.go b/lib/folder/folder-pathmap.go
index bc714dd..e200164 100644
--- a/lib/folder/folder-pathmap.go
+++ b/lib/folder/folder-pathmap.go
@@ -33,7 +33,11 @@ func NewFolderPathMap(gc *xdsconfig.Config) *PathMap {
// NewUID Get a UUID
func (f *PathMap) NewUID(suffix string) string {
- return uuid.NewV1().String() + "_" + suffix
+ uuid := uuid.NewV1().String()
+ if len(suffix) > 0 {
+ uuid += "_" + suffix
+ }
+ return uuid
}
// Add a new folder