mirror of https://github.com/restic/restic.git
Fix spelling errors in comments
This commit is contained in:
parent
be943eaf8b
commit
5399358272
|
@ -41,7 +41,7 @@ func Open(dir string) (*Local, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates all the necessary files and directories for a new local
|
// Create creates all the necessary files and directories for a new local
|
||||||
// backend at dir. Afterwards a new config blob should must created.
|
// backend at dir. Afterwards a new config blob should be created.
|
||||||
func Create(dir string) (*Local, error) {
|
func Create(dir string) (*Local, error) {
|
||||||
dirs := []string{
|
dirs := []string{
|
||||||
dir,
|
dir,
|
||||||
|
@ -53,7 +53,7 @@ func Create(dir string) (*Local, error) {
|
||||||
filepath.Join(dir, backend.Paths.Temp),
|
filepath.Join(dir, backend.Paths.Temp),
|
||||||
}
|
}
|
||||||
|
|
||||||
// test if config file already exist
|
// test if config file already exists
|
||||||
_, err := os.Lstat(backend.Paths.Config)
|
_, err := os.Lstat(backend.Paths.Config)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return nil, errors.New("config file already exists")
|
return nil, errors.New("config file already exists")
|
||||||
|
|
|
@ -89,7 +89,7 @@ func Open(dir string, program string, args ...string) (*SFTP, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates all the necessary files and directories for a new sftp
|
// Create creates all the necessary files and directories for a new sftp
|
||||||
// backend at dir. Afterwards a new config blob should must created.
|
// backend at dir. Afterwards a new config blob should be created.
|
||||||
func Create(dir string, program string, args ...string) (*SFTP, error) {
|
func Create(dir string, program string, args ...string) (*SFTP, error) {
|
||||||
sftp, err := startClient(program, args...)
|
sftp, err := startClient(program, args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -106,7 +106,7 @@ func Create(dir string, program string, args ...string) (*SFTP, error) {
|
||||||
filepath.Join(dir, backend.Paths.Temp),
|
filepath.Join(dir, backend.Paths.Temp),
|
||||||
}
|
}
|
||||||
|
|
||||||
// test if config file already exist
|
// test if config file already exists
|
||||||
_, err = sftp.c.Lstat(backend.Paths.Config)
|
_, err = sftp.c.Lstat(backend.Paths.Config)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return nil, errors.New("config file already exists")
|
return nil, errors.New("config file already exists")
|
||||||
|
|
|
@ -149,7 +149,7 @@ func (s *Server) LoadBlob(t pack.BlobType, id backend.ID) ([]byte, error) {
|
||||||
return plain, nil
|
return plain, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadJSONEncrypted decrypts the data and afterwards calls json.Unmarshal on
|
// LoadJSONUnpacked decrypts the data and afterwards calls json.Unmarshal on
|
||||||
// the item.
|
// the item.
|
||||||
func (s *Server) LoadJSONUnpacked(t backend.Type, id backend.ID, item interface{}) error {
|
func (s *Server) LoadJSONUnpacked(t backend.Type, id backend.ID, item interface{}) error {
|
||||||
// load blob from backend
|
// load blob from backend
|
||||||
|
@ -566,8 +566,8 @@ func (s *Server) loadConfig(cfg *Config) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SearchKey tries to find a key for which the supplied password works,
|
// SearchKey finds a key with the supplied password, afterwards the config is
|
||||||
// afterwards the repository config is read and parsed.
|
// read and parsed.
|
||||||
func (s *Server) SearchKey(password string) error {
|
func (s *Server) SearchKey(password string) error {
|
||||||
key, err := SearchKey(s, password)
|
key, err := SearchKey(s, password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue