forked from TrueCloudLab/restic
Correctly test for config file
This commit is contained in:
parent
b211f834fa
commit
0a457eafed
3 changed files with 9 additions and 6 deletions
|
@ -110,7 +110,7 @@ func Create(dir string, program string, args ...string) (*SFTP, error) {
|
|||
}
|
||||
|
||||
// test if config file already exists
|
||||
_, err = sftp.c.Lstat(backend.Paths.Config)
|
||||
_, err = sftp.c.Lstat(filepath.Join(dir, backend.Paths.Config))
|
||||
if err == nil {
|
||||
return nil, errors.New("config file already exists")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue