Code Review
/
src
/
xds
/
xds-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fixed folder ID and label generation.
[src/xds/xds-server.git]
/
lib
/
syncthing
/
folder-st.go
diff --git
a/lib/syncthing/folder-st.go
b/lib/syncthing/folder-st.go
index
27a43e6
..
f25a505
100644
(file)
--- 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