mirror of
https://github.com/syncthing/syncthing.git
synced 2026-05-13 09:36:19 -04:00
Undo Goland madness
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user