aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syncthing
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/syncthing
parentb1708565ee2b4d725bb98c6b015f16af3d2a097e (diff)
Fixed folder ID and label generation.
Folder ID is now a simple uuid (without sub-string of label)
Diffstat (limited to 'lib/syncthing')
-rw-r--r--lib/syncthing/folder-st.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/syncthing/folder-st.go b/lib/syncthing/folder-st.go
index 27a43e6..f25a505 100644
--- a/lib/syncthing/folder-st.go
+++ b/lib/syncthing/folder-st.go
@@ -39,7 +39,11 @@ func (f *STFolder) NewUID(suffix string) string {
if i > 15 {
i = 15
}
- return uuid.NewV1().String()[:14] + f.st.MyID[:i] + "_" + suffix
+ uuid := uuid.NewV1().String()[:14] + f.st.MyID[:i]
+ if len(suffix) > 0 {
+ uuid += "_" + suffix
+ }
+ return uuid
}
// Add a new folder