From 5cc1760fdf0aa11c0ccdc1ae6866ea8387a595fa Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Sat, 16 May 2020 14:05:26 +0800 Subject: [PATCH] Fix typos --- CHANGELOG.md | 4 ++-- changelog/0.8.0_2017-11-26/issue-1445 | 2 +- cmd/restic/exclude.go | 2 +- doc/050_restore.rst | 2 +- internal/archiver/archiver.go | 2 +- internal/archiver/testing_test.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0850c1261..14b2a3955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1360,8 +1360,8 @@ Details the latest version of restic. Exploiting the vulnerability requires a Linux/Unix system which saves backups via restic and - a Windows systems which restores files from the repo. In addition, the attackers need to be able - to create create files with arbitrary names which are then saved to the restic repo. For + a Windows systems which restores files from the repo. In addition, the attackers need to be + able to create files with arbitrary names which are then saved to the restic repo. For example, by creating a file named "..\test.txt" (which is a perfectly legal filename on Linux) and restoring a snapshot containing this file on Windows, it would be written to the parent of the target directory. diff --git a/changelog/0.8.0_2017-11-26/issue-1445 b/changelog/0.8.0_2017-11-26/issue-1445 index 7027e5cb6..5787c0903 100644 --- a/changelog/0.8.0_2017-11-26/issue-1445 +++ b/changelog/0.8.0_2017-11-26/issue-1445 @@ -7,7 +7,7 @@ vulnerability, but urge all users to upgrade to the latest version of restic. Exploiting the vulnerability requires a Linux/Unix system which saves backups via restic and a Windows systems which restores files from the repo. In -addition, the attackers need to be able to create create files with arbitrary +addition, the attackers need to be able to create files with arbitrary names which are then saved to the restic repo. For example, by creating a file named "..\test.txt" (which is a perfectly legal filename on Linux) and restoring a snapshot containing this file on Windows, it would be written to diff --git a/cmd/restic/exclude.go b/cmd/restic/exclude.go index 09d35b226..e2c386f24 100644 --- a/cmd/restic/exclude.go +++ b/cmd/restic/exclude.go @@ -131,7 +131,7 @@ func rejectIfPresent(excludeFileSpec string) (RejectByNameFunc, error) { } // isExcludedByFile interprets filename as a path and returns true if that file -// is in a excluded directory. A directory is identified as excluded if it contains a +// is in an excluded directory. A directory is identified as excluded if it contains a // tagfile which bears the name specified in tagFilename and starts with // header. If rc is non-nil, it is used to expedite the evaluation of a // directory based on previous visits. diff --git a/doc/050_restore.rst b/doc/050_restore.rst index c52946bb1..4ded09fec 100644 --- a/doc/050_restore.rst +++ b/doc/050_restore.rst @@ -52,7 +52,7 @@ You can use the command ``restic ls latest`` or ``restic find foo`` to find the path to the file within the snapshot. This path you can then pass to ``--include`` in verbatim to only restore the single file or directory. -There are case insensitive variants of of ``--exclude`` and ``--include`` called +There are case insensitive variants of ``--exclude`` and ``--include`` called ``--iexclude`` and ``--iinclude``. These options will behave the same way but ignore the casing of paths. diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index d389c8892..2565ba677 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -181,7 +181,7 @@ func (arch *Archiver) saveTree(ctx context.Context, t *restic.Tree) (restic.ID, return res.ID(), s, nil } -// nodeFromFileInfo returns the restic node from a os.FileInfo. +// nodeFromFileInfo returns the restic node from an os.FileInfo. func (arch *Archiver) nodeFromFileInfo(filename string, fi os.FileInfo) (*restic.Node, error) { node, err := restic.NodeFromFileInfo(filename, fi) if !arch.WithAtime { diff --git a/internal/archiver/testing_test.go b/internal/archiver/testing_test.go index c8ce8d529..68563948b 100644 --- a/internal/archiver/testing_test.go +++ b/internal/archiver/testing_test.go @@ -17,7 +17,7 @@ import ( ) // MockT passes through all logging functions from T, but catches Fail(), -// Error/f() and Fatal/f(). It is used to test test helper functions. +// Error/f() and Fatal/f(). It is used to test helper functions. type MockT struct { *testing.T HasFailed bool