Undo Goland madness
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user