Correctly test for config file

This commit is contained in:
Alexander Neumann 2015-08-26 22:06:52 +02:00
parent b211f834fa
commit 0a457eafed
3 changed files with 9 additions and 6 deletions

View file

@ -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")
}