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
|
@ -57,7 +57,7 @@ func Create(dir string) (*Local, error) {
|
|||
}
|
||||
|
||||
// test if config file already exists
|
||||
_, err := os.Lstat(backend.Paths.Config)
|
||||
_, err := os.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