lib/model: Create folders via newFolder
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4329
This commit is contained in:
committed by
Audrius Butkevicius
parent
c7221b035d
commit
ddf6d64faa
@@ -7,7 +7,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
@@ -21,23 +20,10 @@ func init() {
|
||||
|
||||
type sendOnlyFolder struct {
|
||||
folder
|
||||
config.FolderConfiguration
|
||||
}
|
||||
|
||||
func newSendOnlyFolder(model *Model, cfg config.FolderConfiguration, _ versioner.Versioner, _ fs.Filesystem) service {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
return &sendOnlyFolder{
|
||||
folder: folder{
|
||||
stateTracker: newStateTracker(cfg.ID),
|
||||
scan: newFolderScanner(cfg),
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
model: model,
|
||||
initialScanFinished: make(chan struct{}),
|
||||
},
|
||||
FolderConfiguration: cfg,
|
||||
}
|
||||
return &sendOnlyFolder{folder: newFolder(model, cfg)}
|
||||
}
|
||||
|
||||
func (f *sendOnlyFolder) Serve() {
|
||||
|
||||
Reference in New Issue
Block a user