summaryrefslogtreecommitdiffstats
path: root/lib/syncthing/stfolder.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncthing/stfolder.go')
-rw-r--r--lib/syncthing/stfolder.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/syncthing/stfolder.go b/lib/syncthing/stfolder.go
index 70ac70a..503ba4b 100644
--- a/lib/syncthing/stfolder.go
+++ b/lib/syncthing/stfolder.go
@@ -7,7 +7,7 @@ import (
"strings"
"github.com/iotbzh/xds-server/lib/folder"
- "github.com/syncthing/syncthing/lib/config"
+ stconfig "github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/protocol"
)
@@ -32,9 +32,9 @@ func (s *SyncThing) FolderLoadFromStConfig(f *[]folder.FolderConfig) error {
}
for _, stFld := range stCfg.Folders {
- cliPath := strings.TrimPrefix(stFld.RawPath, s.conf.FileConf.ShareRootDir)
+ cliPath := strings.TrimPrefix(stFld.Path, s.conf.FileConf.ShareRootDir)
if cliPath == "" {
- cliPath = stFld.RawPath
+ cliPath = stFld.Path
}
*f = append(*f, folder.FolderConfig{
ID: stFld.ID,
@@ -69,7 +69,7 @@ func (s *SyncThing) FolderChange(f folder.FolderConfig) (string, error) {
return "", err
}
- newDevice := config.DeviceConfiguration{
+ newDevice := stconfig.DeviceConfiguration{
DeviceID: devID,
Name: stClientID,
Addresses: []string{"dynamic"},
@@ -95,22 +95,22 @@ func (s *SyncThing) FolderChange(f folder.FolderConfig) (string, error) {
id = stClientID[0:15] + "_" + label
}
- folder := config.FolderConfiguration{
- ID: id,
- Label: label,
- RawPath: filepath.Join(s.conf.FileConf.ShareRootDir, f.ClientPath),
+ folder := stconfig.FolderConfiguration{
+ ID: id,
+ Label: label,
+ Path: filepath.Join(s.conf.FileConf.ShareRootDir, f.ClientPath),
}
if s.conf.FileConf.SThgConf.RescanIntervalS > 0 {
folder.RescanIntervalS = s.conf.FileConf.SThgConf.RescanIntervalS
}
- folder.Devices = append(folder.Devices, config.FolderDeviceConfiguration{
+ folder.Devices = append(folder.Devices, stconfig.FolderDeviceConfiguration{
DeviceID: newDevice.DeviceID,
})
found = false
- var fld config.FolderConfiguration
+ var fld stconfig.FolderConfiguration
for _, fld = range stCfg.Folders {
if folder.ID == fld.ID {
fld = folder
@@ -155,8 +155,8 @@ func (s *SyncThing) FolderDelete(id string) error {
}
// FolderConfigGet Returns the configuration of a specific folder
-func (s *SyncThing) FolderConfigGet(folderID string) (config.FolderConfiguration, error) {
- fc := config.FolderConfiguration{}
+func (s *SyncThing) FolderConfigGet(folderID string) (stconfig.FolderConfiguration, error) {
+ fc := stconfig.FolderConfiguration{}
if folderID == "" {
return fc, fmt.Errorf("folderID not set")
}