all: Fix comment typos
Skip-check: authors GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4481
This commit is contained in:
@@ -21,7 +21,7 @@ var (
|
||||
|
||||
// An AtomicWriter is an *os.File that writes to a temporary file in the same
|
||||
// directory as the final path. On successful Close the file is renamed to
|
||||
// it's final path. Any error on Write or during Close is accumulated and
|
||||
// its final path. Any error on Write or during Close is accumulated and
|
||||
// returned on Close, so a lazy user can ignore errors until Close.
|
||||
type AtomicWriter struct {
|
||||
path string
|
||||
|
||||
@@ -35,9 +35,9 @@ func TryRename(filesystem fs.Filesystem, from, to string) error {
|
||||
})
|
||||
}
|
||||
|
||||
// Rename moves a temporary file to it's final place.
|
||||
// Rename moves a temporary file to its final place.
|
||||
// Will make sure to delete the from file if the operation fails, so use only
|
||||
// for situations like committing a temp file to it's final location.
|
||||
// for situations like committing a temp file to its final location.
|
||||
// Tries hard to succeed on various systems by temporarily tweaking directory
|
||||
// permissions and removing the destination file when necessary.
|
||||
func Rename(filesystem fs.Filesystem, from, to string) error {
|
||||
@@ -114,7 +114,7 @@ func withPreparedTarget(filesystem fs.Filesystem, from, to string, f func() erro
|
||||
|
||||
// copyFileContents copies the contents of the file named src to the file named
|
||||
// by dst. The file will be created if it does not already exist. If the
|
||||
// destination file exists, all it's contents will be replaced by the contents
|
||||
// destination file exists, all its contents will be replaced by the contents
|
||||
// of the source file.
|
||||
func copyFileContents(filesystem fs.Filesystem, src, dst string) (err error) {
|
||||
in, err := filesystem.Open(src)
|
||||
|
||||
Reference in New Issue
Block a user