mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-04 23:55:22 +00:00
typos and spelling correction
This commit is contained in:
parent
a5e11c7489
commit
32a76901a9
@ -15,7 +15,7 @@ This is the `syncthing` project which pursues the following goals:
|
|||||||
|
|
||||||
2. Provide the reference implementation to demonstrate the usability of
|
2. Provide the reference implementation to demonstrate the usability of
|
||||||
said protocol. This is the `syncthing` utility. We hope that
|
said protocol. This is the `syncthing` utility. We hope that
|
||||||
alternative, compatible implementations of the protocol will arrise.
|
alternative, compatible implementations of the protocol will arise.
|
||||||
|
|
||||||
The two are evolving together; the protocol is not to be considered
|
The two are evolving together; the protocol is not to be considered
|
||||||
stable until syncthing 1.0 is released, at which point it is locked down
|
stable until syncthing 1.0 is released, at which point it is locked down
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// The connection service listens on TLS and dials configured unconnected
|
// The connection service listens on TLS and dials configured unconnected
|
||||||
// devices. Successfull connections are handed to the model.
|
// devices. Successful connections are handed to the model.
|
||||||
type connectionSvc struct {
|
type connectionSvc struct {
|
||||||
*suture.Supervisor
|
*suture.Supervisor
|
||||||
cfg *config.Wrapper
|
cfg *config.Wrapper
|
||||||
@ -116,7 +116,7 @@ next:
|
|||||||
remoteID := protocol.NewDeviceID(remoteCert.Raw)
|
remoteID := protocol.NewDeviceID(remoteCert.Raw)
|
||||||
|
|
||||||
// The device ID should not be that of ourselves. It can happen
|
// The device ID should not be that of ourselves. It can happen
|
||||||
// though, especially in the presense of NAT hairpinning, multiple
|
// though, especially in the presence of NAT hairpinning, multiple
|
||||||
// clients between the same NAT gateway, and global discovery.
|
// clients between the same NAT gateway, and global discovery.
|
||||||
if remoteID == myID {
|
if remoteID == myID {
|
||||||
l.Infof("Connected to myself (%s) - should not happen", remoteID)
|
l.Infof("Connected to myself (%s) - should not happen", remoteID)
|
||||||
@ -128,7 +128,7 @@ next:
|
|||||||
// could use some better handling. If the old connection is dead but
|
// could use some better handling. If the old connection is dead but
|
||||||
// hasn't timed out yet we may want to drop *that* connection and keep
|
// hasn't timed out yet we may want to drop *that* connection and keep
|
||||||
// this one. But in case we are two devices connecting to each other
|
// this one. But in case we are two devices connecting to each other
|
||||||
// in parallell we don't want to do that or we end up with no
|
// in parallel we don't want to do that or we end up with no
|
||||||
// connections still established...
|
// connections still established...
|
||||||
if s.model.ConnectedTo(remoteID) {
|
if s.model.ConnectedTo(remoteID) {
|
||||||
l.Infof("Connected to already connected device (%s)", remoteID)
|
l.Infof("Connected to already connected device (%s)", remoteID)
|
||||||
|
@ -124,7 +124,7 @@ func monitorMain() {
|
|||||||
|
|
||||||
case err = <-exit:
|
case err = <-exit:
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Successfull exit indicates an intentional shutdown
|
// Successful exit indicates an intentional shutdown
|
||||||
return
|
return
|
||||||
} else if exiterr, ok := err.(*exec.ExitError); ok {
|
} else if exiterr, ok := err.(*exec.ExitError); ok {
|
||||||
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
|
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
|
||||||
|
@ -132,7 +132,7 @@ func (c *folderSummarySvc) calculateSummaries() {
|
|||||||
// foldersToHandle returns the list of folders needing a summary update, and
|
// foldersToHandle returns the list of folders needing a summary update, and
|
||||||
// clears the list.
|
// clears the list.
|
||||||
func (c *folderSummarySvc) foldersToHandle() []string {
|
func (c *folderSummarySvc) foldersToHandle() []string {
|
||||||
// We only recalculate sumamries if someone is listening to events
|
// We only recalculate summaries if someone is listening to events
|
||||||
// (a request to /rest/events has been made within the last
|
// (a request to /rest/events has been made within the last
|
||||||
// pingEventInterval).
|
// pingEventInterval).
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ syncthing.config(function ($httpProvider, $translateProvider, LocaleServiceProvi
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// @TODO: extract global level functions into seperate service(s)
|
// @TODO: extract global level functions into separate service(s)
|
||||||
|
|
||||||
function deviceCompare(a, b) {
|
function deviceCompare(a, b) {
|
||||||
if (typeof a.name !== 'undefined' && typeof b.name !== 'undefined') {
|
if (typeof a.name !== 'undefined' && typeof b.name !== 'undefined') {
|
||||||
|
@ -12,7 +12,7 @@ angular.module('syncthing.core')
|
|||||||
// progress the browser on some platforms returns a 200 (since the
|
// progress the browser on some platforms returns a 200 (since the
|
||||||
// headers has been flushed with the return code 200), with no data.
|
// headers has been flushed with the return code 200), with no data.
|
||||||
// This basically means that the connection has been reset, and the call
|
// This basically means that the connection has been reset, and the call
|
||||||
// was not actually sucessful.
|
// was not actually successful.
|
||||||
if (!data) {
|
if (!data) {
|
||||||
errorFn(data);
|
errorFn(data);
|
||||||
return;
|
return;
|
||||||
|
@ -220,7 +220,7 @@ angular.module('syncthing.core')
|
|||||||
var copiedFromElsewhere = 100 * s.copiedFromElsewhere / s.total;
|
var copiedFromElsewhere = 100 * s.copiedFromElsewhere / s.total;
|
||||||
var pulled = 100 * s.pulled / s.total;
|
var pulled = 100 * s.pulled / s.total;
|
||||||
var pulling = 100 * s.pulling / s.total;
|
var pulling = 100 * s.pulling / s.total;
|
||||||
// We try to round up pulling to atleast a percent so that it would be atleast a bit visible.
|
// We try to round up pulling to at least a percent so that it would be at least a bit visible.
|
||||||
if (pulling < 1 && pulled + copiedFromElsewhere + copiedFromOrigin + reused <= 99) {
|
if (pulling < 1 && pulled + copiedFromElsewhere + copiedFromOrigin + reused <= 99) {
|
||||||
pulling = 1;
|
pulling = 1;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ angular.module('syncthing.core')
|
|||||||
$scope.localesNames = availableLocaleNames;
|
$scope.localesNames = availableLocaleNames;
|
||||||
$scope.visible = $scope.localesNames && $scope.localesNames['en'];
|
$scope.visible = $scope.localesNames && $scope.localesNames['en'];
|
||||||
|
|
||||||
// using $watch cause LocaleService.currentLocale will be change after recive async query accpeted-languages
|
// using $watch cause LocaleService.currentLocale will be change after receive async query accepted-languages
|
||||||
// in LocaleService.readBrowserLocales
|
// in LocaleService.readBrowserLocales
|
||||||
var remove_watch = $scope.$watch(LocaleService.getCurrentLocale, function (newValue) {
|
var remove_watch = $scope.$watch(LocaleService.getCurrentLocale, function (newValue) {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
|
@ -42,7 +42,7 @@ angular.module('syncthing.core')
|
|||||||
* @returns promise which on success resolves with a locales array
|
* @returns promise which on success resolves with a locales array
|
||||||
*/
|
*/
|
||||||
function readBrowserLocales() {
|
function readBrowserLocales() {
|
||||||
// @TODO: check if there is nice way to utilize window.navigator.languages or similiar api.
|
// @TODO: check if there is nice way to utilize window.navigator.languages or similar api.
|
||||||
|
|
||||||
return $http.get(urlbase + "/svc/lang");
|
return $http.get(urlbase + "/svc/lang");
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ func TestGlobalDiscovery(t *testing.T) {
|
|||||||
|
|
||||||
addrs := d.Lookup(device)
|
addrs := d.Lookup(device)
|
||||||
if len(addrs) != 2 {
|
if len(addrs) != 2 {
|
||||||
t.Fatal("Wrong numer of addresses", addrs)
|
t.Fatal("Wrong number of addresses", addrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, addr := range []string{"test.com:1234", "best.com:2345"} {
|
for _, addr := range []string{"test.com:1234", "best.com:2345"} {
|
||||||
@ -119,10 +119,10 @@ func TestGlobalDiscovery(t *testing.T) {
|
|||||||
|
|
||||||
addrs = d.Lookup(device)
|
addrs = d.Lookup(device)
|
||||||
if len(addrs) != 2 {
|
if len(addrs) != 2 {
|
||||||
t.Fatal("Wrong numer of addresses", addrs)
|
t.Fatal("Wrong number of addresses", addrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Answer should be cached, so number of lookups should have not incresed
|
// Answer should be cached, so number of lookups should have not increased
|
||||||
for _, c := range []*DummyClient{c1, c2, c3} {
|
for _, c := range []*DummyClient{c1, c2, c3} {
|
||||||
if len(c.lookups) != 1 || c.lookups[0] != device {
|
if len(c.lookups) != 1 || c.lookups[0] != device {
|
||||||
t.Fatal("Wrong lookups")
|
t.Fatal("Wrong lookups")
|
||||||
|
@ -1626,7 +1626,7 @@ func (m *Model) String() string {
|
|||||||
func symlinkInvalid(isLink bool) bool {
|
func symlinkInvalid(isLink bool) bool {
|
||||||
if !symlinks.Supported && isLink {
|
if !symlinks.Supported && isLink {
|
||||||
SymlinkWarning.Do(func() {
|
SymlinkWarning.Do(func() {
|
||||||
l.Warnln("Symlinks are disabled, unsupported or require Administrator priviledges. This might cause your folder to appear out of sync.")
|
l.Warnln("Symlinks are disabled, unsupported or require Administrator privileges. This might cause your folder to appear out of sync.")
|
||||||
})
|
})
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ func (t *ProgressEmitter) Register(s *sharedPullerState) {
|
|||||||
t.registry[filepath.Join(s.folder, s.file.Name)] = s
|
t.registry[filepath.Join(s.folder, s.file.Name)] = s
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deregister a puller which will stop boardcasting pullers state.
|
// Deregister a puller which will stop broadcasting pullers state.
|
||||||
func (t *ProgressEmitter) Deregister(s *sharedPullerState) {
|
func (t *ProgressEmitter) Deregister(s *sharedPullerState) {
|
||||||
t.mut.Lock()
|
t.mut.Lock()
|
||||||
defer t.mut.Unlock()
|
defer t.mut.Unlock()
|
||||||
|
@ -806,7 +806,7 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks
|
|||||||
reused = len(file.Blocks) - len(blocks)
|
reused = len(file.Blocks) - len(blocks)
|
||||||
if reused == 0 {
|
if reused == 0 {
|
||||||
// Otherwise, discard the file ourselves in order for the
|
// Otherwise, discard the file ourselves in order for the
|
||||||
// sharedpuller not to panic when it fails to exlusively create a
|
// sharedpuller not to panic when it fails to exclusively create a
|
||||||
// file which already exists
|
// file which already exists
|
||||||
os.Remove(tempName)
|
os.Remove(tempName)
|
||||||
}
|
}
|
||||||
@ -876,7 +876,7 @@ func (p *rwFolder) shortcutFile(file protocol.FileInfo) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// shortcutSymlink changes the symlinks type if necessery.
|
// shortcutSymlink changes the symlinks type if necessary.
|
||||||
func (p *rwFolder) shortcutSymlink(file protocol.FileInfo) (err error) {
|
func (p *rwFolder) shortcutSymlink(file protocol.FileInfo) (err error) {
|
||||||
err = symlinks.ChangeType(filepath.Join(p.dir, file.Name), file.Flags)
|
err = symlinks.ChangeType(filepath.Join(p.dir, file.Name), file.Flags)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@ -977,7 +977,7 @@ func (p *rwFolder) pullerRoutine(in <-chan pullBlockState, out chan<- *sharedPul
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get an fd to the temporary file. Tehcnically we don't need it until
|
// Get an fd to the temporary file. Technically we don't need it until
|
||||||
// after fetching the block, but if we run into an error here there is
|
// after fetching the block, but if we run into an error here there is
|
||||||
// no point in issuing the request to the network.
|
// no point in issuing the request to the network.
|
||||||
fd, err := state.tempFile()
|
fd, err := state.tempFile()
|
||||||
|
@ -410,7 +410,7 @@ func TestDeregisterOnFailInCopy(t *testing.T) {
|
|||||||
|
|
||||||
p.handleFile(file, copyChan, finisherChan)
|
p.handleFile(file, copyChan, finisherChan)
|
||||||
|
|
||||||
// Receive a block at puller, to indicate that atleast a single copier
|
// Receive a block at puller, to indicate that at least a single copier
|
||||||
// loop has been performed.
|
// loop has been performed.
|
||||||
toPull := <-pullChan
|
toPull := <-pullChan
|
||||||
// Wait until copier is trying to pass something down to the puller again
|
// Wait until copier is trying to pass something down to the puller again
|
||||||
|
@ -46,7 +46,7 @@ type Walker struct {
|
|||||||
BlockSize int
|
BlockSize int
|
||||||
// If Matcher is not nil, it is used to identify files to ignore which were specified by the user.
|
// If Matcher is not nil, it is used to identify files to ignore which were specified by the user.
|
||||||
Matcher *ignore.Matcher
|
Matcher *ignore.Matcher
|
||||||
// If TempNamer is not nil, it is used to ignore tempory files when walking.
|
// If TempNamer is not nil, it is used to ignore temporary files when walking.
|
||||||
TempNamer TempNamer
|
TempNamer TempNamer
|
||||||
// Number of hours to keep temporary files for
|
// Number of hours to keep temporary files for
|
||||||
TempLifetime time.Duration
|
TempLifetime time.Duration
|
||||||
@ -387,7 +387,7 @@ func SymlinkTypeEqual(disk, index uint32) bool {
|
|||||||
// know and someone else knows, just accept it. The fact that you don't
|
// know and someone else knows, just accept it. The fact that you don't
|
||||||
// know means you are on Unix, and on Unix you don't really care what the
|
// know means you are on Unix, and on Unix you don't really care what the
|
||||||
// target type is. The moment you do know, and if something doesn't match,
|
// target type is. The moment you do know, and if something doesn't match,
|
||||||
// that will propogate throught the cluster.
|
// that will propagate through the cluster.
|
||||||
if disk&protocol.FlagSymlinkMissingTarget != 0 && index&protocol.FlagSymlinkMissingTarget == 0 {
|
if disk&protocol.FlagSymlinkMissingTarget != 0 && index&protocol.FlagSymlinkMissingTarget == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ var correctIgnores = map[string][]string{
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// This test runs the risk of entering infinite recursion if it fails.
|
// This test runs the risk of entering infinite recursion if it fails.
|
||||||
// Limit the stack size to 10 megs to creash early in that case instead of
|
// Limit the stack size to 10 megs to crash early in that case instead of
|
||||||
// potentially taking down the box...
|
// potentially taking down the box...
|
||||||
rdebug.SetMaxStack(10 * 1 << 20)
|
rdebug.SetMaxStack(10 * 1 << 20)
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Needs administrator priviledges.
|
// Needs administrator privileges.
|
||||||
// Let's check that everything works.
|
// Let's check that everything works.
|
||||||
// This could be done more officially:
|
// This could be done more officially:
|
||||||
// http://stackoverflow.com/questions/2094663/determine-if-windows-process-has-privilege-to-create-symbolic-link
|
// http://stackoverflow.com/questions/2094663/determine-if-windows-process-has-privilege-to-create-symbolic-link
|
||||||
|
@ -3809,6 +3809,6 @@
|
|||||||
],
|
],
|
||||||
"tarball_url": "https://api.github.com/repos/syncthing/syncthing/tarball/v0.10.26",
|
"tarball_url": "https://api.github.com/repos/syncthing/syncthing/tarball/v0.10.26",
|
||||||
"zipball_url": "https://api.github.com/repos/syncthing/syncthing/zipball/v0.10.26",
|
"zipball_url": "https://api.github.com/repos/syncthing/syncthing/zipball/v0.10.26",
|
||||||
"body": "* Silence discovery warnings when v6 not available (#1418, @AudriusButkevicius)\r\n* Make sure we start scanning at an indexed location (#1399, @AudriusButkevicius)\r\n* Add missing translation strings (#1430, @AudriusButkevicius)\r\n* Allow not to limit bandwidth in LAN (#1336, @AudriusButkevicius)\r\n* Remove red if we managed to report to atleast one discovery server (#1427, @AudriusButkevicius)\r\n* Compress only metadata by default (#1374, @calmh)\r\n* Don't yell about discovery listening and resolving (#1418, @calmh)\r\n* Fall back to %AppData% if %LocalAppData% is blank (#1446, @calmh)\r\n"
|
"body": "* Silence discovery warnings when v6 not available (#1418, @AudriusButkevicius)\r\n* Make sure we start scanning at an indexed location (#1399, @AudriusButkevicius)\r\n* Add missing translation strings (#1430, @AudriusButkevicius)\r\n* Allow not to limit bandwidth in LAN (#1336, @AudriusButkevicius)\r\n* Remove red if we managed to report to at least one discovery server (#1427, @AudriusButkevicius)\r\n* Compress only metadata by default (#1374, @calmh)\r\n* Don't yell about discovery listening and resolving (#1418, @calmh)\r\n* Fall back to %AppData% if %LocalAppData% is blank (#1446, @calmh)\r\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -25,7 +25,7 @@ var tagExp = regexp.MustCompile(`.*~([^~.]+)(?:\.[^.]+)?$`)
|
|||||||
// Returns the tag from a filename, whether at the end or middle.
|
// Returns the tag from a filename, whether at the end or middle.
|
||||||
func filenameTag(path string) string {
|
func filenameTag(path string) string {
|
||||||
match := tagExp.FindStringSubmatch(path)
|
match := tagExp.FindStringSubmatch(path)
|
||||||
// match is []string{"whole match", "submatch"} when successfull
|
// match is []string{"whole match", "submatch"} when successful
|
||||||
|
|
||||||
if len(match) != 2 {
|
if len(match) != 2 {
|
||||||
return ""
|
return ""
|
||||||
|
@ -467,7 +467,7 @@ func isTimeout(err error) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return strings.Contains(err.Error(), "use of closed network connection") ||
|
return strings.Contains(err.Error(), "use of closed network connection") ||
|
||||||
strings.Contains(err.Error(), "request cancelled while waiting")
|
strings.Contains(err.Error(), "request canceled while waiting")
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTestName() string {
|
func getTestName() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user