diff options
Diffstat (limited to 'lib/syncthing/folder-st.go')
-rw-r--r-- | lib/syncthing/folder-st.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/syncthing/folder-st.go b/lib/syncthing/folder-st.go index 7e1fe55..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 @@ -57,10 +61,8 @@ func (f *STFolder) Add(cfg folder.FolderConfig) (*folder.FolderConfig, error) { f.fConfig = cfg - f.fConfig.DataCloudSync.BuilderSThgID = f.st.MyID // FIXME - should be removed after local ST config rework - // Update Syncthing folder - // (expect if status is ErrorConfig) + // (except if status is ErrorConfig) // TODO: add cache to avoid multiple requests on startup if f.fConfig.Status != folder.StatusErrorConfig { id, err := f.st.FolderChange(f.fConfig) |