Remove duplicate fields and set default SDK dir.
[src/xds/xds-server.git] / lib / syncthing / stfolder.go
index 45ac60d..661e19d 100644 (file)
@@ -55,7 +55,11 @@ func (s *SyncThing) FolderChange(f xdsconfig.FolderConfig) error {
        folder := config.FolderConfiguration{
                ID:      id,
                Label:   label,
-               RawPath: filepath.Join(s.conf.ShareRootDir, f.RelativePath),
+               RawPath: filepath.Join(s.conf.FileConf.ShareRootDir, f.RelativePath),
+       }
+
+       if s.conf.FileConf.SThgConf.RescanIntervalS > 0 {
+               folder.RescanIntervalS = s.conf.FileConf.SThgConf.RescanIntervalS
        }
 
        folder.Devices = append(folder.Devices, config.FolderDeviceConfiguration{