MCPcopy Index your code
hub / github.com/syncthing/syncthing / startFolderDatabases

Method startFolderDatabases

internal/db/sqlite/db_update.go:83–95  ·  view source on GitHub ↗

startFolderDatabases loads all existing folder databases, thus causing migrations to apply.

()

Source from the content-addressed store, hash-verified

81// startFolderDatabases loads all existing folder databases, thus causing
82// migrations to apply.
83func (s *DB) startFolderDatabases() error {
84 ids, err := s.ListFolders()
85 if err != nil {
86 return wrap(err)
87 }
88 for _, id := range ids {
89 _, err := s.getFolderDB(id, false)
90 if err != nil && !errors.Is(err, errNoSuchFolder) {
91 return wrap(err)
92 }
93 }
94 return nil
95}
96
97// wrap returns the error wrapped with the calling function name and
98// optional extra context strings as prefix. A nil error wraps to nil.

Callers 1

OpenFunction · 0.95

Implementers 1

DBinternal/db/sqlite/db_open.go

Calls 4

ListFoldersMethod · 0.95
getFolderDBMethod · 0.95
wrapFunction · 0.70
IsMethod · 0.45

Tested by

no test coverage detected