Refactor variable names and revert shadow copy path computation

This commit is contained in:
Etienne Charlier
2017-06-07 21:01:50 +02:00
parent c88e148d59
commit c688c501d3
7 changed files with 41 additions and 43 deletions

View File

@@ -80,9 +80,9 @@ func checkHostKey(repository string, hostname string, remote net.Addr, key ssh.P
if len(repository) == 0 {
return nil
}
duplicacyDirectory := GetDotDuplicacyPathName(repository)
hostFile := path.Join(duplicacyDirectory, "knowns_hosts")
preferencePath := GetDuplicacyPreferencePath(repository)
hostFile := path.Join(preferencePath, "knowns_hosts")
file, err := os.OpenFile(hostFile, os.O_RDWR | os.O_CREATE, 0600)
if err != nil {
return err