mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
all: Fix typos found by codespell (#8833)
This commit is contained in:
parent
bc371eacf6
commit
526e21ae26
@ -894,7 +894,7 @@ func getReport(db *sql.DB) map[string]interface{} {
|
|||||||
r["distributions"] = analyticsFor(distributions, len(knownDistributions))
|
r["distributions"] = analyticsFor(distributions, len(knownDistributions))
|
||||||
r["featureOrder"] = featureOrder
|
r["featureOrder"] = featureOrder
|
||||||
r["locations"] = locations
|
r["locations"] = locations
|
||||||
r["contries"] = countryList
|
r["countries"] = countryList
|
||||||
|
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ found in the LICENSE file.
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .contries | slice 2 1}}
|
{{range .countries | slice 2 1}}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 45%">{{.Key}}</td>
|
<td style="width: 45%">{{.Key}}</td>
|
||||||
<td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>
|
<td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>
|
||||||
@ -291,7 +291,7 @@ found in the LICENSE file.
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .contries | slice 2 2}}
|
{{range .countries | slice 2 2}}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 45%">{{.Key}}</td>
|
<td style="width: 45%">{{.Key}}</td>
|
||||||
<td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>
|
<td style="width: 5%" class="text-right">{{if ge .Pct 10.0}}{{.Pct | printf "%.0f"}}{{else if ge .Pct 1.0}}{{.Pct | printf "%.01f"}}{{else}}{{.Pct | printf "%.02f"}}{{end}}%</td>
|
||||||
|
@ -3378,7 +3378,7 @@ angular.module('syncthing.core')
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the user explicitely added a wild-card, we don't show hints.
|
// When the user explicitly added a wild-card, we don't show hints.
|
||||||
if (filterEntries.length === 1 && filterEntries[0].match === '*') {
|
if (filterEntries.length === 1 && filterEntries[0].match === '*') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -3413,7 +3413,7 @@ angular.module('syncthing.core')
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.validateXattrFilter = function () {
|
$scope.validateXattrFilter = function () {
|
||||||
// Fitlering out empty rules when saving the config
|
// Filtering out empty rules when saving the config
|
||||||
$scope.currentFolder.xattrFilter.entries = $scope.currentFolder.xattrFilter.entries.filter(function (n) {
|
$scope.currentFolder.xattrFilter.entries = $scope.currentFolder.xattrFilter.entries.filter(function (n) {
|
||||||
return n.match !== "";
|
return n.match !== "";
|
||||||
});
|
});
|
||||||
|
@ -1368,7 +1368,7 @@ func startWrapper(wrapper Wrapper) *testWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestInternalVersioningConfiguration(t *testing.T) {
|
func TestInternalVersioningConfiguration(t *testing.T) {
|
||||||
// Verify that the versioning configuration XML seralizes to something
|
// Verify that the versioning configuration XML serializes to something
|
||||||
// reasonable.
|
// reasonable.
|
||||||
|
|
||||||
cfg := New(device1)
|
cfg := New(device1)
|
||||||
|
@ -328,8 +328,8 @@ func (w *wrapper) notifyListeners(from, to Configuration) Waiter {
|
|||||||
wg := sync.NewWaitGroup()
|
wg := sync.NewWaitGroup()
|
||||||
wg.Add(len(w.subs))
|
wg.Add(len(w.subs))
|
||||||
for _, sub := range w.subs {
|
for _, sub := range w.subs {
|
||||||
go func(commiter Committer) {
|
go func(committer Committer) {
|
||||||
w.notifyListener(commiter, from, to)
|
w.notifyListener(committer, from, to)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(sub)
|
}(sub)
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ func listXattr(path string) ([]string, error) {
|
|||||||
if errors.Is(err, unix.ERANGE) || size == len(buf) {
|
if errors.Is(err, unix.ERANGE) || size == len(buf) {
|
||||||
// Buffer is too small. Try again with a zero sized buffer to
|
// Buffer is too small. Try again with a zero sized buffer to
|
||||||
// get the size, then allocate a buffer of the correct size. We
|
// get the size, then allocate a buffer of the correct size. We
|
||||||
// inlude the size == len(buf) because apparently macOS doesn't
|
// include the size == len(buf) because apparently macOS doesn't
|
||||||
// return ERANGE as it should -- no harm done, just an extra
|
// return ERANGE as it should -- no harm done, just an extra
|
||||||
// read if we happened to need precisely 1024 bytes on the first
|
// read if we happened to need precisely 1024 bytes on the first
|
||||||
// pass.
|
// pass.
|
||||||
|
@ -761,7 +761,7 @@ func (f *folder) scanSubdirsDeletedAndIgnored(subDirs []string, batch *scanBatch
|
|||||||
fallthrough
|
fallthrough
|
||||||
case !file.IsIgnored() && !file.IsDeleted() && !file.IsUnsupported():
|
case !file.IsIgnored() && !file.IsDeleted() && !file.IsUnsupported():
|
||||||
// The file is not ignored, deleted or unsupported. Lets check if
|
// The file is not ignored, deleted or unsupported. Lets check if
|
||||||
// it's still here. Simply stat:ing it wont do as there are
|
// it's still here. Simply stat:ing it won't do as there are
|
||||||
// tons of corner cases (e.g. parent dir->symlink, missing
|
// tons of corner cases (e.g. parent dir->symlink, missing
|
||||||
// permissions)
|
// permissions)
|
||||||
if !osutil.IsDeleted(f.mtimefs, file.Name) {
|
if !osutil.IsDeleted(f.mtimefs, file.Name) {
|
||||||
|
@ -1906,7 +1906,7 @@ func (m *model) Request(deviceID protocol.DeviceID, folder, name string, _, size
|
|||||||
if err == nil && scanner.Validate(res.data, hash, weakHash) {
|
if err == nil && scanner.Validate(res.data, hash, weakHash) {
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
// Fall through to reading from a non-temp file, just incase the temp
|
// Fall through to reading from a non-temp file, just in case the temp
|
||||||
// file has finished downloading.
|
// file has finished downloading.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3957,7 +3957,7 @@ func TestIssue6961(t *testing.T) {
|
|||||||
must(t, tfs.Remove(name))
|
must(t, tfs.Remove(name))
|
||||||
m.ScanFolders()
|
m.ScanFolders()
|
||||||
|
|
||||||
// Drop ther remote index, add some other file.
|
// Drop the remote index, add some other file.
|
||||||
must(t, m.Index(device2, fcfg.ID, []protocol.FileInfo{{Name: "bar", RawInvalid: true, Sequence: 1}}))
|
must(t, m.Index(device2, fcfg.ID, []protocol.FileInfo{{Name: "bar", RawInvalid: true, Sequence: 1}}))
|
||||||
|
|
||||||
// Pause and unpause folder to create new db.FileSet and thus recalculate everything
|
// Pause and unpause folder to create new db.FileSet and thus recalculate everything
|
||||||
|
@ -751,7 +751,7 @@ func TestRequestRemoteRenameChanged(t *testing.T) {
|
|||||||
t.Error("Got more than one index update for", f.Name)
|
t.Error("Got more than one index update for", f.Name)
|
||||||
}
|
}
|
||||||
if f.Version.Counter(fc.id.Short()) == 0 {
|
if f.Version.Counter(fc.id.Short()) == 0 {
|
||||||
// This index entry might be superseeded
|
// This index entry might be superseded
|
||||||
// by the final one or sent before it separately.
|
// by the final one or sent before it separately.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -1994,7 +1994,7 @@ These endpoints require the \fBgui.debugging\fP configuration option to
|
|||||||
be enabled and yield an access denied error code otherwise.
|
be enabled and yield an access denied error code otherwise.
|
||||||
.SS GET /rest/debug/peerCompletion
|
.SS GET /rest/debug/peerCompletion
|
||||||
.sp
|
.sp
|
||||||
Summarizes the completion precentage for each remote device. Returns an object
|
Summarizes the completion percentage for each remote device. Returns an object
|
||||||
with device IDs as keys and an integer percentage as values.
|
with device IDs as keys and an integer percentage as values.
|
||||||
.SS GET /rest/debug/httpmetrics
|
.SS GET /rest/debug/httpmetrics
|
||||||
.sp
|
.sp
|
||||||
|
@ -16,8 +16,8 @@ export class CachingInterceptor implements HttpInterceptor {
|
|||||||
constructor(private cache: RequestCacheService) { }
|
constructor(private cache: RequestCacheService) { }
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler) {
|
intercept(req: HttpRequest<any>, next: HttpHandler) {
|
||||||
// continue if not cachable.
|
// continue if not cacheable.
|
||||||
if (!isCachable(req)) { return next.handle(req); }
|
if (!isCacheable(req)) { return next.handle(req); }
|
||||||
|
|
||||||
const cachedResponse = this.cache.get(req);
|
const cachedResponse = this.cache.get(req);
|
||||||
return cachedResponse ?
|
return cachedResponse ?
|
||||||
@ -25,9 +25,9 @@ export class CachingInterceptor implements HttpInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Is this request cachable? */
|
/** Is this request cacheable? */
|
||||||
function isCachable(req: HttpRequest<any>) {
|
function isCacheable(req: HttpRequest<any>) {
|
||||||
// Only GET requests are cachable
|
// Only GET requests are cacheable
|
||||||
return req.method === 'GET';
|
return req.method === 'GET';
|
||||||
/*
|
/*
|
||||||
return req.method === 'GET' &&
|
return req.method === 'GET' &&
|
||||||
|
@ -36,7 +36,7 @@ export class DbCompletionService {
|
|||||||
.get<Completion>(this.dbStatusUrl, httpOptions)
|
.get<Completion>(this.dbStatusUrl, httpOptions)
|
||||||
.pipe(
|
.pipe(
|
||||||
map(res => {
|
map(res => {
|
||||||
// Remove from array in developement
|
// Remove from array in development
|
||||||
// in-memory-web-api returns arrays
|
// in-memory-web-api returns arrays
|
||||||
if (!environment.production) {
|
if (!environment.production) {
|
||||||
const a: any = res as any;
|
const a: any = res as any;
|
||||||
|
@ -28,7 +28,7 @@ export class DbStatusService {
|
|||||||
.get<Folder.Status>(this.dbStatusUrl, httpOptions)
|
.get<Folder.Status>(this.dbStatusUrl, httpOptions)
|
||||||
.pipe(
|
.pipe(
|
||||||
map(res => {
|
map(res => {
|
||||||
// Remove from array in developement
|
// Remove from array in development
|
||||||
// in-memory-web-api returns arrays
|
// in-memory-web-api returns arrays
|
||||||
if (!environment.production) {
|
if (!environment.production) {
|
||||||
const a: any = res as any;
|
const a: any = res as any;
|
||||||
|
Loading…
Reference in New Issue
Block a user