summaryrefslogtreecommitdiffstats
path: root/lib/folder
diff options
context:
space:
mode:
Diffstat (limited to 'lib/folder')
-rw-r--r--lib/folder/folder-interface.go8
-rw-r--r--lib/folder/folder-pathmap.go6
-rw-r--r--lib/folder/folder-st-disable.go6
3 files changed, 15 insertions, 5 deletions
diff --git a/lib/folder/folder-interface.go b/lib/folder/folder-interface.go
index aec773d..9eb6829 100644
--- a/lib/folder/folder-interface.go
+++ b/lib/folder/folder-interface.go
@@ -60,9 +60,11 @@ type FolderConfig struct {
// PathMapConfig Path mapping specific data
type PathMapConfig struct {
- ServerPath string `json:"serverPath"`
- CheckFile string `json:"checkFile"`
- CheckContent string `json:"checkContent"`
+ ServerPath string `json:"serverPath"`
+
+ // Don't keep temporary file name (IOW we don't want to save it and reuse it)
+ CheckFile string `json:"checkFile" xml:"-"`
+ CheckContent string `json:"checkContent" xml:"-"`
}
// CloudSyncConfig CloudSync (AKA Syncthing) specific data
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
diff --git a/lib/folder/folder-st-disable.go b/lib/folder/folder-st-disable.go
index f90b776..7b53ca8 100644
--- a/lib/folder/folder-st-disable.go
+++ b/lib/folder/folder-st-disable.go
@@ -25,7 +25,11 @@ func NewFolderSTDisable(gc *xdsconfig.Config) *STFolderDisable {
// NewUID Get a UUID
func (f *STFolderDisable) 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