2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 00:33:57 +00:00

Fix missing Join calls

This commit is contained in:
Jan Bader 2015-11-03 18:47:01 +01:00
parent 81ec7337e0
commit d09e6d5b0f

View File

@ -111,7 +111,7 @@ func Create(dir string, program string, args ...string) (*SFTP, error) {
}
// test if config file already exists
_, err = sftp.c.Lstat(dir + backend.Paths.Config)
_, err = sftp.c.Lstat(Join(dir, backend.Paths.Config))
if err == nil {
return nil, errors.New("config file already exists")
}
@ -310,7 +310,7 @@ func Join(parts ...string) string {
// Construct path for given backend.Type and name.
func (r *SFTP) filename(t backend.Type, name string) string {
if t == backend.Config {
return Join(r.p + "config")
return Join(r.p, "config")
}
return Join(r.dirname(t, name), name)