Compare commits

..
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -978,7 +978,7 @@ func loadConfigAtStartup() *config.Wrapper {
cfgFile := locations[locConfigFile]
cfg, err := config.Load(cfgFile, myID)
if os.IsNotExist(err) {
cfg := defaultConfig(cfgFile)
cfg = defaultConfig(cfgFile)
cfg.Save()
l.Infof("Default config saved. Edit %s to taste or use the GUI\n", cfg.ConfigPath())
} else if err == io.EOF {
+1
View File
@@ -40,6 +40,7 @@ func newFolder(model *Model, cfg config.FolderConfiguration) folder {
cancel: cancel,
model: model,
initialScanFinished: make(chan struct{}),
watchCancel: func() {},
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ func (f *sendOnlyFolder) Serve() {
f.scan.timer.Stop()
}()
if f.FSWatcherEnabled {
if f.FSWatcherEnabled && f.CheckHealth() == nil {
f.startWatch()
}
+1 -1
View File
@@ -164,7 +164,7 @@ func (f *sendReceiveFolder) Serve() {
var prevSec int64
var prevIgnoreHash string
if f.FSWatcherEnabled {
if f.FSWatcherEnabled && f.CheckHealth() == nil {
f.startWatch()
}