diff --git a/lib/model/folder.go b/lib/model/folder.go index a0a7bb753..d34fd8ec7 100644 --- a/lib/model/folder.go +++ b/lib/model/folder.go @@ -9,6 +9,7 @@ package model import ( "context" "errors" + "fmt" "math/rand" "time" @@ -389,3 +390,7 @@ func (f *folder) basePause() time.Duration { } return time.Duration(f.PullerPauseS) * time.Second } + +func (f *folder) String() string { + return fmt.Sprintf("%s/%s@%p", f.Type, f.folderID, f) +} diff --git a/lib/model/folder_sendonly.go b/lib/model/folder_sendonly.go index 448ad09a2..584b3f9b1 100644 --- a/lib/model/folder_sendonly.go +++ b/lib/model/folder_sendonly.go @@ -7,8 +7,6 @@ package model import ( - "fmt" - "github.com/syncthing/syncthing/lib/config" "github.com/syncthing/syncthing/lib/db" "github.com/syncthing/syncthing/lib/fs" @@ -32,10 +30,6 @@ func newSendOnlyFolder(model *Model, cfg config.FolderConfiguration, _ versioner return f } -func (f *sendOnlyFolder) String() string { - return fmt.Sprintf("sendOnlyFolder/%s@%p", f.folderID, f) -} - func (f *sendOnlyFolder) PullErrors() []FileError { return nil } diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index ac42cf378..e62aa66db 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -131,10 +131,6 @@ func newSendReceiveFolder(model *Model, cfg config.FolderConfiguration, ver vers return f } -func (f *sendReceiveFolder) String() string { - return fmt.Sprintf("sendReceiveFolder/%s@%p", f.folderID, f) -} - func (f *sendReceiveFolder) pull() bool { select { case <-f.initialScanFinished: