aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syncthing/stfolder.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncthing/stfolder.go')
-rw-r--r--lib/syncthing/stfolder.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/syncthing/stfolder.go b/lib/syncthing/stfolder.go
index d79e579..45ac60d 100644
--- a/lib/syncthing/stfolder.go
+++ b/lib/syncthing/stfolder.go
@@ -4,21 +4,13 @@ import (
"path/filepath"
"strings"
+ "github.com/iotbzh/xds-server/lib/xdsconfig"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/protocol"
)
-// FIXME remove and use an interface on xdsconfig.FolderConfig
-type FolderChangeArg struct {
- ID string
- Label string
- RelativePath string
- SyncThingID string
- ShareRootDir string
-}
-
// FolderChange is called when configuration has changed
-func (s *SyncThing) FolderChange(f FolderChangeArg) error {
+func (s *SyncThing) FolderChange(f xdsconfig.FolderConfig) error {
// Get current config
stCfg, err := s.ConfigGet()
@@ -63,7 +55,7 @@ func (s *SyncThing) FolderChange(f FolderChangeArg) error {
folder := config.FolderConfiguration{
ID: id,
Label: label,
- RawPath: filepath.Join(f.ShareRootDir, f.RelativePath),
+ RawPath: filepath.Join(s.conf.ShareRootDir, f.RelativePath),
}
folder.Devices = append(folder.Devices, config.FolderDeviceConfiguration{
'>136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191