lib/model: Use factories for creating folders
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3029
This commit is contained in:
committed by
Jakob Borg
parent
6720906ee5
commit
eabd2fc936
@@ -12,13 +12,18 @@ import (
|
||||
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
"github.com/syncthing/syncthing/lib/sync"
|
||||
"github.com/syncthing/syncthing/lib/versioner"
|
||||
)
|
||||
|
||||
func init() {
|
||||
folderFactories[config.FolderTypeReadOnly] = newROFolder
|
||||
}
|
||||
|
||||
type roFolder struct {
|
||||
folder
|
||||
}
|
||||
|
||||
func newROFolder(model *Model, cfg config.FolderConfiguration) *roFolder {
|
||||
func newROFolder(model *Model, cfg config.FolderConfiguration, ver versioner.Versioner) service {
|
||||
return &roFolder{
|
||||
folder: folder{
|
||||
stateTracker: stateTracker{
|
||||
|
||||
Reference in New Issue
Block a user