summaryrefslogtreecommitdiffstats
path: root/lib/syncthing/stfolder.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-07 23:03:52 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-09 10:03:06 +0200
commit90992bcc039d2b982ad6df18cf3188b53f939368 (patch)
tree45d471124064e58e7bcc8c6aeca1355d558abd09 /lib/syncthing/stfolder.go
parentd917dcca04b8d5f5a7a4fdf82d0a66ef14611fca (diff)
Kill right Syncthing (same url) in DEBUG_MODE
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/syncthing/stfolder.go')
-rw-r--r--lib/syncthing/stfolder.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/syncthing/stfolder.go b/lib/syncthing/stfolder.go
index d5c74ef..2ad6859 100644
--- a/lib/syncthing/stfolder.go
+++ b/lib/syncthing/stfolder.go
@@ -72,16 +72,17 @@ func (s *SyncThing) FolderChange(f FolderChangeArg) (string, error) {
return "", err
}
+ stClientID := f.SyncThingID
// Add new Device if needed
var devID protocol.DeviceID
- if err := devID.UnmarshalText([]byte(f.SyncThingID)); err != nil {
+ if err := devID.UnmarshalText([]byte(stClientID)); err != nil {
s.log.Errorf("not a valid device id (err %v)", err)
return "", err
}
newDevice := stconfig.DeviceConfiguration{
DeviceID: devID,
- Name: f.SyncThingID,
+ Name: stClientID,
Addresses: []string{"dynamic"},
}
@@ -102,7 +103,7 @@ func (s *SyncThing) FolderChange(f FolderChangeArg) (string, error) {
label = strings.Split(id, "/")[0]
}
if id = f.ID; id == "" {
- id = f.SyncThingID[0:15] + "_" + label
+ id = stClientID[0:15] + "_" + label
}
// Resolve local path