diff --git a/lib/config/migrations.go b/lib/config/migrations.go index f633a4c1f..bc126d12d 100644 --- a/lib/config/migrations.go +++ b/lib/config/migrations.go @@ -183,7 +183,7 @@ func migrateToConfigV21(cfg *Configuration) { } switch folder.Versioning.Type { case "simple", "trashcan": - // ClearForVersion out symlinks in the known place + // Clean out symlinks in the known place cleanSymlinks(folder.Filesystem(), ".stversions") case "staggered": versionDir := folder.Versioning.Params["versionsPath"] diff --git a/lib/db/db_test.go b/lib/db/db_test.go index 8300fc0e8..5467f3916 100644 --- a/lib/db/db_test.go +++ b/lib/db/db_test.go @@ -505,7 +505,7 @@ func TestCheckGlobals(t *testing.T) { t.Fatal(err) } - // ClearForVersion up global entry of the now missing file + // Clean up global entry of the now missing file if err := db.checkGlobals([]byte(fs.folder)); err != nil { t.Fatal(err) } diff --git a/lib/model/folder.go b/lib/model/folder.go index 544eab5a9..a78ac4b8f 100644 --- a/lib/model/folder.go +++ b/lib/model/folder.go @@ -386,7 +386,7 @@ func (f *folder) scanSubdirs(subDirs []string) error { // and it's ok to release twice. defer snap.Release() - // ClearForVersion the list of subitems to ensure that we start at a known + // Clean the list of subitems to ensure that we start at a known // directory, and don't scan subdirectories of things we've already // scanned. subDirs = unifySubs(subDirs, func(file string) bool { diff --git a/lib/model/progressemitter.go b/lib/model/progressemitter.go index 24f8bef36..263674008 100644 --- a/lib/model/progressemitter.go +++ b/lib/model/progressemitter.go @@ -179,7 +179,7 @@ func (t *ProgressEmitter) computeProgressUpdates() []progressUpdate { } } - // ClearForVersion up sentDownloadStates for devices which we are no longer connected to. + // Clean up sentDownloadStates for devices which we are no longer connected to. for id := range t.sentDownloadStates { _, ok := t.connections[id] if !ok { diff --git a/lib/model/progressemitter_test.go b/lib/model/progressemitter_test.go index f393d9840..bbe6792f1 100644 --- a/lib/model/progressemitter_test.go +++ b/lib/model/progressemitter_test.go @@ -415,8 +415,8 @@ func TestSendDownloadProgressMessages(t *testing.T) { expectEmpty() // Device is no longer subscribed to a particular folder - delete(p.registry["folder"], "1") // ClearForVersion up first - delete(p.registry["folder2"], "2") // ClearForVersion up first + delete(p.registry["folder"], "1") // Clean up first + delete(p.registry["folder2"], "2") // Clean up first sendMsgs(p) expect(-1, state1, protocol.UpdateTypeForget, v1, nil, true) diff --git a/lib/model/sentdownloadstate.go b/lib/model/sentdownloadstate.go index b079127cb..821e395a3 100644 --- a/lib/model/sentdownloadstate.go +++ b/lib/model/sentdownloadstate.go @@ -79,7 +79,7 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco if !pullerVersion.Equal(localFile.version) || !pullerCreated.Equal(localFile.created) { // The version has changed or the puller was reconstrcuted due to failure. - // ClearForVersion up whatever we had for the old file, and advertise the new file. + // Clean up whatever we had for the old file, and advertise the new file. updates = append(updates, protocol.FileDownloadProgressUpdate{ Name: name, Version: localFile.version, diff --git a/lib/protocol/protocol.go b/lib/protocol/protocol.go index bd82ef910..4811f315e 100644 --- a/lib/protocol/protocol.go +++ b/lib/protocol/protocol.go @@ -602,7 +602,7 @@ func checkFilename(name string) error { cleanedName := path.Clean(name) if cleanedName != name { // The filename on the wire should be in canonical format. If - // ClearForVersion() managed to clean it up, there was something wrong with + // Clean() managed to clean it up, there was something wrong with // it. return errUncleanFilename } @@ -618,7 +618,7 @@ func checkFilename(name string) error { } if strings.HasPrefix(name, "../") { // Starting with a dotdot is not allowed. Any other dotdots would - // have been handled by the ClearForVersion() call at the top. + // have been handled by the Clean() call at the top. return errInvalidFilename } return nil