mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 23:08:27 +00:00
Emit ConfigSaved event
This commit is contained in:
parent
0d51f83d2d
commit
8f32decf2d
@ -14,6 +14,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"code.google.com/p/go.crypto/bcrypt"
|
"code.google.com/p/go.crypto/bcrypt"
|
||||||
|
"github.com/syncthing/syncthing/events"
|
||||||
"github.com/syncthing/syncthing/logger"
|
"github.com/syncthing/syncthing/logger"
|
||||||
"github.com/syncthing/syncthing/osutil"
|
"github.com/syncthing/syncthing/osutil"
|
||||||
"github.com/syncthing/syncthing/protocol"
|
"github.com/syncthing/syncthing/protocol"
|
||||||
@ -260,6 +261,7 @@ func (cfg *Configuration) Save() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
l.Warnln("Saving config:", err)
|
l.Warnln("Saving config:", err)
|
||||||
}
|
}
|
||||||
|
events.Default.Log(events.ConfigSaved, cfg)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ const (
|
|||||||
ItemStarted
|
ItemStarted
|
||||||
StateChanged
|
StateChanged
|
||||||
RepoRejected
|
RepoRejected
|
||||||
|
ConfigSaved
|
||||||
|
|
||||||
AllEvents = ^EventType(0)
|
AllEvents = ^EventType(0)
|
||||||
)
|
)
|
||||||
@ -56,6 +57,8 @@ func (t EventType) String() string {
|
|||||||
return "StateChanged"
|
return "StateChanged"
|
||||||
case RepoRejected:
|
case RepoRejected:
|
||||||
return "RepoRejected"
|
return "RepoRejected"
|
||||||
|
case ConfigSaved:
|
||||||
|
return "ConfigSaved"
|
||||||
default:
|
default:
|
||||||
return "Unknown"
|
return "Unknown"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user