all: Fix various user-facing and non-user-facing typos (#8509)

Found via `codespell -q 3 -S lang,./gui/default/vendor -L benchs,bu,inflight,ro`
This commit is contained in:
luzpaz
2022-08-23 15:44:11 +02:00
committed by GitHub
parent 62d4261f62
commit 837ffcfab5
30 changed files with 40 additions and 40 deletions
+3 -3
View File
@@ -1189,7 +1189,7 @@ func TestBrowse(t *testing.T) {
current string
returns []string
}{
// The direcotory without slash is completed to one with slash.
// The directory without slash is completed to one with slash.
{tmpDir, []string{tmpDir + pathSep}},
// With slash it's completed to its contents.
// Dirs are given pathSeps.
@@ -1201,7 +1201,7 @@ func TestBrowse(t *testing.T) {
{tmpDir + pathSep + "dir", []string{dirPath}},
{tmpDir + pathSep + "f", nil},
{tmpDir + pathSep + "q", nil},
// Globbing is case-insensitve
// Globbing is case-insensitive
{tmpDir + pathSep + "mixed", []string{mixedCaseDirPath}},
}
@@ -1387,7 +1387,7 @@ func TestConfigChanges(t *testing.T) {
t.Fatal(err)
}
if opts.MaxSendKbps != 50 {
t.Error("Exepcted 50 for MaxSendKbps, got", opts.MaxSendKbps)
t.Error("Expected 50 for MaxSendKbps, got", opts.MaxSendKbps)
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ func (f FolderConfiguration) Copy() FolderConfiguration {
// Filesystem creates a filesystem for the path and options of this folder.
// The fset parameter may be nil, in which case no mtime handling on top of
// the fileystem is provided.
// the filesystem is provided.
func (f FolderConfiguration) Filesystem(fset *db.FileSet) fs.Filesystem {
// This is intentionally not a pointer method, because things like
// cfg.Folders["default"].Filesystem(nil) should be valid.
+1 -1
View File
@@ -189,7 +189,7 @@ func (opts OptionsConfiguration) FeatureFlag(name string) bool {
// LowestConnectionLimit is the lower of ConnectionLimitEnough or
// ConnectionLimitMax, or whichever of them is actually set if only one of
// them is set. It's the point where we should stop dialling.
// them is set. It's the point where we should stop dialing.
func (opts OptionsConfiguration) LowestConnectionLimit() int {
limit := opts.ConnectionLimitEnough
if limit == 0 || (opts.ConnectionLimitMax != 0 && opts.ConnectionLimitMax < limit) {
+1 -1
View File
@@ -20,7 +20,7 @@ func TestDialQueueSort(t *testing.T) {
t.Run("ByLastSeen", func(t *testing.T) {
t.Parallel()
// Devices seen within the last week or so should be sorted stricly in order.
// Devices seen within the last week or so should be sorted strictly in order.
now := time.Now()
queue := dialQueue{
{id: device1, lastSeen: now.Add(-5 * time.Hour)}, // 1
+1 -1
View File
@@ -754,7 +754,7 @@ func TestUpdateTo14(t *testing.T) {
t.Fatal(err)
}
// Initally add the correct file the usual way, all good here.
// Initially add the correct file the usual way, all good here.
if err := db.updateLocalFiles(folder, []protocol.FileInfo{file}, meta); err != nil {
t.Fatal(err)
}
+2 -2
View File
@@ -1020,7 +1020,7 @@ func TestWithHaveSequence(t *testing.T) {
}
func TestStressWithHaveSequence(t *testing.T) {
// This races two loops against each other: one that contiously does
// This races two loops against each other: one that continuously does
// updates, and one that continuously does sequence walks. The test fails
// if the sequence walker sees a discontinuity.
@@ -1306,7 +1306,7 @@ func TestReceiveOnlyAccounting(t *testing.T) {
t.Fatal("expected 1 receive only changed file after local change, not", n)
}
if n := receiveOnlyChangedSize(t, s).Bytes; n != 100 {
t.Fatal("expected 100 receive only changed btyes after local change, not", n)
t.Fatal("expected 100 receive only changed bytes after local change, not", n)
}
// Fake a revert. That's a two step process, first converting our
+1 -1
View File
@@ -137,7 +137,7 @@ func NewGlobal(server string, cert tls.Certificate, addrList AddressLister, evLo
evLogger: evLogger,
}
if !opts.noAnnounce {
// If we are supposed to annonce, it's an error until we've done so.
// If we are supposed to announce, it's an error until we've done so.
cl.setError(errors.New("not announced"))
}
+1 -1
View File
@@ -37,7 +37,7 @@ func (e basicFileInfo) Mode() FileMode {
// NTFS deduped files. Remove the symlink bit.
m &^= os.ModeSymlink
}
// Set executable bits on files with executable extenions (.exe, .bat, etc).
// Set executable bits on files with executable extensions (.exe, .bat, etc).
if isWindowsExecutable(e.Name()) {
m |= 0111
}
+1 -1
View File
@@ -242,7 +242,7 @@ func benchmarkWalkFakeFS(b *testing.B, fsys Filesystem, paths []string, otherOpE
}
func TestStressCaseFS(t *testing.T) {
// Exercise a bunch of paralell operations for stressing out race
// Exercise a bunch of parallel operations for stressing out race
// conditions in the realnamer cache etc.
const limit = 10 * time.Second
+1 -1
View File
@@ -205,7 +205,7 @@ func TestMtimeFSInsensitive(t *testing.T) {
t.Error("Should not have failed:", err)
}
// Check that we get back the mtime we set, if we were supposed to succed.
// Check that we get back the mtime we set, if we were supposed to succeed.
info, err := fs.Lstat("testdata/FILE")
if err != nil {
t.Error("Lstat shouldn't fail:", err)
+1 -1
View File
@@ -556,7 +556,7 @@ func parseIgnoreFile(fs fs.Filesystem, fd io.Reader, currentFile string, cd Chan
} else {
// Wrap the error, as if the include does not exist, we get a
// IsNotExists(err) == true error, which we use to check
// existance of the .stignore file, and just end up assuming
// existence of the .stignore file, and just end up assuming
// there is none, rather than a broken include.
err = parseError(fmt.Errorf("failed to load include file %s: %w", includeFile, err))
}
+2 -2
View File
@@ -503,7 +503,7 @@ nextFile:
devices := snap.Availability(fileName)
for _, dev := range devices {
if _, ok := f.model.Connection(dev); ok {
// Handle the file normally, by coping and pulling, etc.
// Handle the file normally, by copying and pulling, etc.
f.handleFile(fi, snap, copyChan)
continue nextFile
}
@@ -1877,7 +1877,7 @@ func (f *sendReceiveFolder) newPullError(path string, err error) {
// Establish context to differentiate from errors while scanning.
// Use "syncing" as opposed to "pulling" as the latter might be used
// for errors occurring specificly in the puller routine.
// for errors occurring specifically in the puller routine.
errStr := fmt.Sprintln("syncing:", err)
f.tempPullErrors[path] = errStr
+2 -2
View File
@@ -1433,7 +1433,7 @@ func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice
}
if !(hasTokenRemote || hasTokenLocal || isEncryptedRemote || isEncryptedLocal) {
// Noone cares about encryption here
// No one cares about encryption here
return nil
}
@@ -1515,7 +1515,7 @@ func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice
m.fmut.Lock()
m.folderEncryptionPasswordTokens[fcfg.ID] = ccToken
m.fmut.Unlock()
// We can only announce ourselfs once we have the token,
// We can only announce ourselves once we have the token,
// thus we need to resend CCs now that we have it.
m.sendClusterConfig(fcfg.DeviceIDs())
return nil
+1 -1
View File
@@ -1174,7 +1174,7 @@ func TestRequestIndexSenderPause(t *testing.T) {
var seq int64 = 1
files := []protocol.FileInfo{{Name: "foo", Size: 10, Version: protocol.Vector{}.Update(myID.Short()), Sequence: seq}}
// Both devices connected, noone paused
// Both devices connected, none paused
localIndexUpdate(m, fcfg.ID, files)
select {
case <-time.After(5 * time.Second):
+1 -1
View File
@@ -78,7 +78,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.
// The version has changed or the puller was reconstructed due to failure.
// Clean up whatever we had for the old file, and advertise the new file.
updates = append(updates,
protocol.FileDownloadProgressUpdate{
+1 -1
View File
@@ -702,7 +702,7 @@ func TestIsEquivalent(t *testing.T) {
// Empty FileInfos are equivalent
{eq: true},
// Various basic attributes, all of which cause ineqality when
// Various basic attributes, all of which cause inequality when
// they differ
{
a: FileInfo{Name: "foo"},
+2 -2
View File
@@ -30,7 +30,7 @@ func EnsureDir(dir string, mode fs.FileMode) error {
}
if fi, err := fs.Stat("."); err == nil {
// Apprently the stat may fail even though the mkdirall passed. If it
// Apparently the stat may fail even though the mkdirall passed. If it
// does, we'll just assume things are in order and let other things
// fail (like loading or creating the config...).
currentMode := fi.Mode() & 0777
@@ -83,7 +83,7 @@ func DefaultConfig(path string, myID protocol.DeviceID, evLogger events.Logger,
}
// LoadConfigAtStartup loads an existing config. If it doesn't yet exist, it
// creates a default one, without the default folder if noDefaultFolder is ture.
// creates a default one, without the default folder if noDefaultFolder is true.
// Otherwise it checks the version, and archives and upgrades the config if
// necessary or returns an error, if the version isn't compatible.
func LoadConfigAtStartup(path string, cert tls.Certificate, evLogger events.Logger, allowNewerConfig, noDefaultFolder, skipPortProbing bool) (config.Wrapper, error) {
+1 -1
View File
@@ -144,7 +144,7 @@ func TestSelectedReleaseMacOS(t *testing.T) {
},
}
// Check that it is selected and the asset is as epected
// Check that it is selected and the asset is as expected
sel, err := SelectLatestRelease(rels, "v0.14.46", false)
if err != nil {
t.Fatal("Unexpected error:", err)
+2 -2
View File
@@ -399,7 +399,7 @@ func (a *aggregator) popOldEventsTo(to map[string]*aggregatedEvent, dir *eventDi
func (a *aggregator) isOld(ev *aggregatedEvent, currTime time.Time, delayRem bool) bool {
// Deletes should in general be scanned last, therefore they are delayed by
// letting them time out. This behaviour is overriden by delayRem == false.
// letting them time out. This behaviour is overridden by delayRem == false.
// Refer to following comments as to why.
// An event that has not registered any new modifications recently is scanned.
// a.notifyDelay is the user facing value signifying the normal delay between
@@ -413,7 +413,7 @@ func (a *aggregator) isOld(ev *aggregatedEvent, currTime time.Time, delayRem boo
// is delayed to reduce resource usage, but after a certain time (notifyTimeout)
// passed it is scanned anyway.
// If only removals are remaining to be scanned, there is no point to delay
// removals further, so this behaviour is overriden by delayRem == false.
// removals further, so this behaviour is overridden by delayRem == false.
return currTime.Sub(ev.firstModTime) > a.notifyTimeout
}