fix(all): various typos (#10242)
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ func (v VersionParts) Environment() string {
|
||||
func ParseVersion(line string) (VersionParts, error) {
|
||||
m := longVersionRE.FindStringSubmatch(line)
|
||||
if len(m) == 0 {
|
||||
return VersionParts{}, errors.New("unintelligeble version string")
|
||||
return VersionParts{}, errors.New("unintelligible version string")
|
||||
}
|
||||
|
||||
v := VersionParts{
|
||||
|
||||
@@ -333,7 +333,7 @@ func (cfg *Configuration) prepareDeviceList() map[protocol.DeviceID]*DeviceConfi
|
||||
// - free from duplicates
|
||||
// - no devices with empty ID
|
||||
// - sorted by ID
|
||||
// Happen before preparting folders as that needs a correct device list.
|
||||
// Happen before preparing folders as that needs a correct device list.
|
||||
cfg.Devices = ensureNoDuplicateOrEmptyIDDevices(cfg.Devices)
|
||||
slices.SortFunc(cfg.Devices, func(a, b DeviceConfiguration) int {
|
||||
return a.DeviceID.Compare(b.DeviceID)
|
||||
|
||||
@@ -235,7 +235,7 @@ func (opts OptionsConfiguration) MaxFolderConcurrency() int {
|
||||
return 0
|
||||
}
|
||||
// Otherwise default to the number of CPU cores in the system as a rough
|
||||
// approximation of system powerfullness.
|
||||
// approximation of system powerfulness.
|
||||
if n := runtime.GOMAXPROCS(-1); n > 0 {
|
||||
return n
|
||||
}
|
||||
|
||||
+1
-1
@@ -657,7 +657,7 @@ func (*fakeFS) SetXattr(_ string, _ []protocol.Xattr, _ XattrFilter) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// A basic glob-impelementation that should be able to handle
|
||||
// A basic glob-implementation that should be able to handle
|
||||
// simple test cases.
|
||||
func (fs *fakeFS) Glob(pattern string) ([]string, error) {
|
||||
dir := filepath.Dir(pattern)
|
||||
|
||||
@@ -323,7 +323,7 @@ func Canonicalize(file string) (string, error) {
|
||||
}
|
||||
|
||||
// The relative path should be clean from internal dotdots and similar
|
||||
// funkyness.
|
||||
// funkiness.
|
||||
file = filepath.Clean(file)
|
||||
|
||||
// It is not acceptable to attempt to traverse upwards.
|
||||
|
||||
@@ -1494,7 +1494,7 @@ func TestEscapePipe(t *testing.T) {
|
||||
|
||||
// overrideBackslashTests has the same wants as the pipeTests tests.
|
||||
// The only difference in the tests is the pipe symbol in the pattern has been
|
||||
// changed to a backslash. This could be done programatically, if desired.
|
||||
// changed to a backslash. This could be done programmatically, if desired.
|
||||
var overrideBackslashTests = []escapeTest{
|
||||
{`a\*`, `a*`, true},
|
||||
{`a\*b`, `a*b`, true},
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
// deviceFolderFileDownloadState holds current download state of a file that
|
||||
// a remote device has advertised. blockIndexes represends indexes within
|
||||
// a remote device has advertised. blockIndexes represents indexes within
|
||||
// FileInfo.Blocks that the remote device already has, and version represents
|
||||
// the version of the file that the remote device is downloading.
|
||||
type deviceFolderFileDownloadState struct {
|
||||
|
||||
@@ -66,7 +66,7 @@ func TestDeviceDownloadState(t *testing.T) {
|
||||
[]protocol.FileDownloadProgressUpdate{f1v1p1, f1v1p2, f1v2p2},
|
||||
},
|
||||
{ // 7
|
||||
// v2 replacees v1, v2 gets deleted, and v2 part 2 gets added.
|
||||
// v2 replaces v1, v2 gets deleted, and v2 part 2 gets added.
|
||||
[]protocol.FileDownloadProgressUpdate{f1v1p1, f1v1p2, f1v2p1, f1v2del, f1v2p2},
|
||||
[]protocol.FileDownloadProgressUpdate{f1v2p2},
|
||||
[]protocol.FileDownloadProgressUpdate{f1v1p1, f1v1p2, f1v2p1},
|
||||
|
||||
+1
-1
@@ -951,7 +951,7 @@ func (f *folder) scanTimerFired() error {
|
||||
if err != nil {
|
||||
f.sl.Error("Failed initial scan", slogutil.Error(err))
|
||||
} else {
|
||||
f.sl.Info("Competed initial scan")
|
||||
f.sl.Info("Completed initial scan")
|
||||
}
|
||||
close(f.initialScanFinished)
|
||||
}
|
||||
|
||||
+2
-2
@@ -1541,7 +1541,7 @@ func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice
|
||||
}
|
||||
|
||||
if isEncryptedRemote && isEncryptedLocal {
|
||||
// Should never happen, but config racyness and be safe.
|
||||
// Should never happen, but config raciness and be safe.
|
||||
return errEncryptionInvConfigLocal
|
||||
}
|
||||
|
||||
@@ -3105,7 +3105,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
||||
|
||||
// Some options don't require restart as those components handle it fine
|
||||
// by themselves. Compare the options structs containing only the
|
||||
// attributes that require restart and act apprioriately.
|
||||
// attributes that require restart and act appropriately.
|
||||
if !reflect.DeepEqual(from.Options.RequiresRestartOnly(), to.Options.RequiresRestartOnly()) {
|
||||
l.Debugln(m, "requires restart, options differ")
|
||||
return false
|
||||
|
||||
@@ -745,7 +745,7 @@ func TestRequestRemoteRenameChanged(t *testing.T) {
|
||||
}
|
||||
case strings.HasPrefix(path, b+".sync-conflict-"):
|
||||
if err := equalContents(tfs, path, otherData); err != nil {
|
||||
t.Error(`Sync conflict of "b" has unexptected content`)
|
||||
t.Error(`Sync conflict of "b" has unexpected content`)
|
||||
}
|
||||
case path == "." || strings.HasPrefix(path, ".stfolder"):
|
||||
default:
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
// GetInterfaceAddrs returns the IP networks of all interfaces that are up.
|
||||
// Point-to-point interfaces are exluded unless includePtP is true.
|
||||
// Point-to-point interfaces are excluded unless includePtP is true.
|
||||
func GetInterfaceAddrs(includePtP bool) ([]*net.IPNet, error) {
|
||||
intfs, err := netutil.Interfaces()
|
||||
if err != nil {
|
||||
|
||||
@@ -933,7 +933,7 @@ func (c *rawConnection) shouldCompressMessage(msg proto.Message) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// Close is called when the connection is regularely closed and thus the Close
|
||||
// Close is called when the connection is regularly closed and thus the Close
|
||||
// BEP message is sent before terminating the actual connection. The error
|
||||
// argument specifies the reason for closing the connection.
|
||||
func (c *rawConnection) Close(err error) {
|
||||
|
||||
@@ -289,7 +289,7 @@ func TestWriteCompressed(t *testing.T) {
|
||||
|
||||
msg := (&Response{Data: make([]byte, 10240)}).toWire()
|
||||
if random {
|
||||
// This should make the message uncompressible.
|
||||
// This should make the message incompressible.
|
||||
rand.Read(msg.Data)
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ type dynamicAnnouncement struct {
|
||||
// relayAddressesOrder checks the latency to each relay, rounds latency down to
|
||||
// the closest 50ms, and puts them in buckets of 50ms latency ranges. Then
|
||||
// shuffles each bucket, and returns all addresses starting with the ones from
|
||||
// the lowest latency bucket, ending with the highest latency buceket.
|
||||
// the lowest latency bucket, ending with the highest latency bucket.
|
||||
func relayAddressesOrder(ctx context.Context, input []string) []string {
|
||||
buckets := make(map[int][]string)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user